From ce043ef8fae99f891725ea3d3ce0ecfa59a89579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 14 Feb 2020 20:00:42 +0100 Subject: [PATCH] Do not try to open the user style file when it is not set --- src/map/IMG/mapdata.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/map/IMG/mapdata.cpp b/src/map/IMG/mapdata.cpp index 00fa621d..c5944c8a 100644 --- a/src/map/IMG/mapdata.cpp +++ b/src/map/IMG/mapdata.cpp @@ -104,8 +104,12 @@ void MapData::load() if (_typ) _style = new Style(_typ); else { - SubFile typ(ProgramPaths::typFile()); - _style = new Style(&typ); + QString typFile(ProgramPaths::typFile()); + if (!typFile.isEmpty()) { + SubFile typ(typFile); + _style = new Style(&typ); + } else + _style = new Style(); } }