1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-30 22:51:16 +01:00

Fixed crash when loading Trekbuddy atlases or Garmin GMAP as map dirs.

This commit is contained in:
Martin Tůma 2021-04-25 10:00:15 +02:00
parent d33bcd1e55
commit 9f3917b0f2

View File

@ -86,7 +86,10 @@ TreeNode<Map *> MapList::loadDir(const QString &path, TreeNode<Map *> *parent)
bool isDir = false; bool isDir = false;
Map *map = loadFile(fi.absoluteFilePath(), &isDir); Map *map = loadFile(fi.absoluteFilePath(), &isDir);
if (isDir) { if (isDir) {
parent->addItem(map); if (parent)
parent->addItem(map);
else
tree.addItem(map);
break; break;
} else } else
tree.addItem(map); tree.addItem(map);