From: Matt Mullins Date: Sat, 16 Jun 2012 04:52:50 +0000 (-0700) Subject: Fix a segfault caused by getFont(). X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=7d0218306ed6712d18135c7bd495fb20a3360d2c;p=IvanGame.git Fix a segfault caused by getFont(). The if(font has been found) statement was written the wrong-way-'round. --- diff --git a/Game.cpp b/Game.cpp index 4b7cec4..b81d9c2 100644 --- a/Game.cpp +++ b/Game.cpp @@ -241,7 +241,7 @@ Font* Game::getFont( int s = 24, FontType t = English){ map font = t == English ? mEnglishFonts : mJapaneseFonts; map::iterator it = font.find(s); //if the font doesn't exist - if (it != font.end()) { + if (it == font.end()) { //create it Font* f = new Font(t, s); font[s] = f;