diff options
author | Bernd Wachter <bwachter@zak.serf.lart.info> | 2009-03-29 20:34:24 +0200 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-30 18:40:55 -0600 |
commit | e1f52fe6501ef61306236333a83c4b519cfdf95c (patch) | |
tree | 84e8adcf908a23023fbba56728a134bf62992a38 /src/gui | |
parent | caf3cad2da9945e48fc2104404460f639c71a6b0 (diff) | |
download | mana-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.cpp | 3 |
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() |