summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/models/parsetreenode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/models/parsetreenode.cpp')
-rw-r--r--utils/themeeditor/models/parsetreenode.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/themeeditor/models/parsetreenode.cpp b/utils/themeeditor/models/parsetreenode.cpp
index cd50718a52..9d23428349 100644
--- a/utils/themeeditor/models/parsetreenode.cpp
+++ b/utils/themeeditor/models/parsetreenode.cpp
@@ -641,6 +641,7 @@ bool ParseTreeNode::execTag(const RBRenderInfo& info, RBViewport* viewport)
char c, hAlign, vAlign;
RBImage* image;
QPixmap temp;
+ RBFont* fLoad;
/* Two switch statements to narrow down the tag name */
switch(element->tag->name[0])
@@ -857,7 +858,11 @@ bool ParseTreeNode::execTag(const RBRenderInfo& info, RBViewport* viewport)
x = element->params[0].data.number;
filename = info.settings()->value("themebase", "") + "/fonts/" +
element->params[1].data.text;
- info.screen()->loadFont(x, new RBFont(filename));
+ fLoad = new RBFont(filename);
+ if(!fLoad->isValid())
+ dynamic_cast<RBScene*>(info.screen()->scene())
+ ->addWarning(QObject::tr("Missing font file: ") + filename);
+ info.screen()->loadFont(x, fLoad);
return true;
}