diff options
author | elupus <elupus@svn> | 2010-01-25 22:24:10 +0000 |
---|---|---|
committer | elupus <elupus@svn> | 2010-01-25 22:24:10 +0000 |
commit | e9d8193da48c94e3e5ec24786e82a99f872752c4 (patch) | |
tree | 32a8374f22578d8367c296e616e177ffcbdd7a46 /guilib/GUIFontTTF.cpp | |
parent | 9a32cc7c3016c46cc7b40cb2e46eb181c3f8b674 (diff) |
fixed: some corner case segfaults for ttf renderer
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@27178 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib/GUIFontTTF.cpp')
-rw-r--r-- | guilib/GUIFontTTF.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/guilib/GUIFontTTF.cpp b/guilib/GUIFontTTF.cpp index cc3931e2e7..a88c75b1e3 100644 --- a/guilib/GUIFontTTF.cpp +++ b/guilib/GUIFontTTF.cpp @@ -553,12 +553,19 @@ bool CGUIFontTTFBase::CacheCharacter(wchar_t letter, uint32_t style, Character * if(newTexture == NULL) { FT_Done_Glyph(glyph); + CLog::Log(LOGDEBUG, "GUIFontTTF::CacheCharacter: Failed to allocate new texture of height %u", newHeight); return false; } m_texture = newTexture; } } + if(m_texture == NULL) + { + CLog::Log(LOGDEBUG, "GUIFontTTF::CacheCharacter: no texture to cache character to"); + return false; + } + // set the character in our table ch->letterAndStyle = (style << 16) | letter; ch->offsetX = (short)bitGlyph->left; |