1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-19 12:12:08 +01:00

Do not try to load the style when it does not exist

This commit is contained in:
Martin Tůma 2023-03-18 09:04:55 +01:00
parent 873db27768
commit 152f17f15a

View File

@ -1,3 +1,4 @@
#include <QFileInfo>
#include "common/programpaths.h" #include "common/programpaths.h"
#include "vectortile.h" #include "vectortile.h"
#include "style.h" #include "style.h"
@ -76,7 +77,7 @@ void MapData::load()
_style = new Style(_typ); _style = new Style(_typ);
else { else {
QString typFile(ProgramPaths::typFile()); QString typFile(ProgramPaths::typFile());
if (!typFile.isEmpty()) { if (QFileInfo::exists(typFile)) {
SubFile typ(&typFile); SubFile typ(&typFile);
_style = new Style(&typ); _style = new Style(&typ);
} else } else