mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-06-27 19:49:15 +02:00
Do not try to load the style when it does not exist
This commit is contained in:
@ -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
|
||||||
|
Reference in New Issue
Block a user