summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/graphics/rbfont.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/graphics/rbfont.cpp')
-rw-r--r--utils/themeeditor/graphics/rbfont.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/utils/themeeditor/graphics/rbfont.cpp b/utils/themeeditor/graphics/rbfont.cpp
index 23791497fd..895e32750e 100644
--- a/utils/themeeditor/graphics/rbfont.cpp
+++ b/utils/themeeditor/graphics/rbfont.cpp
@@ -39,6 +39,8 @@ RBFont::RBFont(QString file)
: valid(false), imageData(0), offsetData(0), widthData(0)
{
+ bool badFile = false;
+
/* Attempting to locate the correct file name */
if(!QFile::exists(file))
{
@@ -52,7 +54,11 @@ RBFont::RBFont(QString file)
settings.endGroup();
if(!QFile::exists(file))
+ {
file = ":/fonts/08-Schumacher-Clean.fnt";
+
+ badFile = true;
+ }
}
header.insert("filename", file);
@@ -65,6 +71,9 @@ RBFont::RBFont(QString file)
widthData = cache->widthData;
header = cache->header;
+ if(!badFile)
+ valid = true;
+
return;
}
@@ -162,6 +171,9 @@ RBFont::RBFont(QString file)
cache->header = header;
RBFontCache::insert(file, cache);
+ if(!badFile)
+ valid = true;
+
}
RBFont::~RBFont()