diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-02 21:17:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-02 21:17:13 +0300 |
commit | 181ecd0c3bf27b47487f973fb83b988fd6ceaecf (patch) | |
tree | 4ee3de6acd80bf81d0960ac49d64f718f5019102 /src/gui/sdlfont.cpp | |
parent | fb1709d774139b2173da6ee95770abaad23f726e (diff) | |
download | mv-181ecd0c3bf27b47487f973fb83b988fd6ceaecf.tar.gz mv-181ecd0c3bf27b47487f973fb83b988fd6ceaecf.tar.bz2 mv-181ecd0c3bf27b47487f973fb83b988fd6ceaecf.tar.xz mv-181ecd0c3bf27b47487f973fb83b988fd6ceaecf.zip |
Another fixes after Coverity checks.
Diffstat (limited to 'src/gui/sdlfont.cpp')
-rw-r--r-- | src/gui/sdlfont.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp index 8b53cafe1..aa512207e 100644 --- a/src/gui/sdlfont.cpp +++ b/src/gui/sdlfont.cpp @@ -74,6 +74,7 @@ class SDLTextChunk final sdlCol.b = static_cast<uint8_t>(color.b); sdlCol.r = static_cast<uint8_t>(color.r); sdlCol.g = static_cast<uint8_t>(color.g); + sdlCol.unused = 0; getSafeUtf8String(text, strBuf); @@ -106,6 +107,7 @@ class SDLTextChunk final sdlCol2.b = static_cast<uint8_t>(color2.b); sdlCol2.r = static_cast<uint8_t>(color2.r); sdlCol2.g = static_cast<uint8_t>(color2.g); + sdlCol2.unused = 0; SDL_Surface *const surface2 = TTF_RenderUTF8_Blended( font, strBuf, sdlCol2); if (!surface2) @@ -260,6 +262,8 @@ void SDLFont::drawString(gcn::Graphics *const graphics, } Graphics *const g = dynamic_cast<Graphics *const>(graphics); + if (!g) + return; gcn::Color col = g->getColor(); gcn::Color col2 = g->getColor2(); |