From 7d0218306ed6712d18135c7bd495fb20a3360d2c Mon Sep 17 00:00:00 2001 From: Matt Mullins Date: Fri, 15 Jun 2012 21:52:50 -0700 Subject: [PATCH] Fix a segfault caused by getFont(). The if(font has been found) statement was written the wrong-way-'round. --- Game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.11.0