diff --git a/src/GUI/gui.cpp b/src/GUI/gui.cpp index 11b2c099..2178835f 100644 --- a/src/GUI/gui.cpp +++ b/src/GUI/gui.cpp @@ -137,11 +137,8 @@ TreeNode GUI::createMapActionsNode(const TreeNode &node) MapAction *a = new MapAction(map, _mapsActionGroup); connect(a, &MapAction::loaded, this, &GUI::mapInitialized); tree.addItem(a); - } else { - qWarning("%s: %s", qPrintable(map->path()), - qPrintable(map->errorString())); + } else delete map; - } } return tree; diff --git a/src/map/maplist.cpp b/src/map/maplist.cpp index 12bfd9de..bf759d7c 100644 --- a/src/map/maplist.cpp +++ b/src/map/maplist.cpp @@ -80,7 +80,6 @@ Map *MapList::loadFile(const QString &path, const Projection &proj, bool *isDir) errors.append(it.key() + ": " + map->errorString()); ++it; } - } else { for (it = _parsers.begin(); it != _parsers.end(); it++) { map = it.value()(path, proj, isDir);