diff --git a/src/map/IMG/trefile.cpp b/src/map/IMG/trefile.cpp index abdffb43..2efdd532 100644 --- a/src/map/IMG/trefile.cpp +++ b/src/map/IMG/trefile.cpp @@ -206,7 +206,11 @@ bool TREFile::load(int idx) qWarning("%s: invalid subdiv bounds (level %d; pos %f,%f; size %fx%f)", qPrintable(fileName()), level.level, toWGS24(lon), toWGS24(lat), toWGS24(width), toWGS24(height)); - goto error; + /* mkgmap produces invalid (zero width or/and zero height) subdiv + bounds in some cases. Allow such bounds as they should not break + things. */ + if (!(!width || !height)) + goto error; } min[0] = bounds.left();