summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorBernd Wachter <bwachter@zak.serf.lart.info>2009-03-29 20:34:24 +0200
committerJared Adams <jaxad0127@gmail.com>2009-03-30 18:40:55 -0600
commite1f52fe6501ef61306236333a83c4b519cfdf95c (patch)
tree84e8adcf908a23023fbba56728a134bf62992a38 /src/gui
parentcaf3cad2da9945e48fc2104404460f639c71a6b0 (diff)
downloadmana-e1f52fe6501ef61306236333a83c4b519cfdf95c.tar.gz
mana-e1f52fe6501ef61306236333a83c4b519cfdf95c.tar.bz2
mana-e1f52fe6501ef61306236333a83c4b519cfdf95c.tar.xz
mana-e1f52fe6501ef61306236333a83c4b519cfdf95c.zip
Fixed checking for loading fonts before applying a style
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/truetypefont.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/truetypefont.cpp b/src/gui/truetypefont.cpp
index b4b839e9..f9e206bc 100644
--- a/src/gui/truetypefont.cpp
+++ b/src/gui/truetypefont.cpp
@@ -86,13 +86,14 @@ TrueTypeFont::TrueTypeFont(const std::string &filename, int size, int style)
++fontCounter;
mFont = TTF_OpenFont(filename.c_str(), size);
- TTF_SetFontStyle (mFont, style);
if (!mFont)
{
throw GCN_EXCEPTION("SDLTrueTypeFont::SDLTrueTypeFont: " +
std::string(TTF_GetError()));
}
+
+ TTF_SetFontStyle (mFont, style);
}
TrueTypeFont::~TrueTypeFont()