From 152f17f15a39d3f72c917d3d08bc7898aecd3b0d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20T=C5=AFma?= Date: Sat, 18 Mar 2023 09:04:55 +0100 Subject: [PATCH] Do not try to load the style when it does not exist --- src/map/IMG/mapdata.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/map/IMG/mapdata.cpp b/src/map/IMG/mapdata.cpp index 01b501d9..6eee71cc 100644 --- a/src/map/IMG/mapdata.cpp +++ b/src/map/IMG/mapdata.cpp @@ -1,3 +1,4 @@ +#include #include "common/programpaths.h" #include "vectortile.h" #include "style.h" @@ -76,7 +77,7 @@ void MapData::load() _style = new Style(_typ); else { QString typFile(ProgramPaths::typFile()); - if (!typFile.isEmpty()) { + if (QFileInfo::exists(typFile)) { SubFile typ(&typFile); _style = new Style(&typ); } else -- 2.11.4.GIT