From f7e55bbc9e8ebc118f080db8e02a2b988c22b30f Mon Sep 17 00:00:00 2001 From: "jean.chalard" Date: Wed, 5 May 2010 11:45:24 +0000 Subject: [PATCH] J : * Fix the last pending bug of issue 380. * This avoids calling the translator before it is initialized. - Removing the call is harmless because it is done later anyway, late enough that we know the translator is initialized, but soon enough for the data gathered by the call hasn't been used yet. * This doesn't protect against future early uses of the translator. - This is quite hard to fix. The translator is initialized really early, pretty much as soon as we know what language is in use. However, there is a little interval and it is possible to call upon it inside (this is what caused this bug). It might also be called before we know the language at all, with obvious problems. --- projects/mtg/src/GameStateMenu.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/projects/mtg/src/GameStateMenu.cpp b/projects/mtg/src/GameStateMenu.cpp index 3e1b17504..94113549a 100644 --- a/projects/mtg/src/GameStateMenu.cpp +++ b/projects/mtg/src/GameStateMenu.cpp @@ -154,12 +154,9 @@ void GameStateMenu::Start(){ mBg = resources.RetrieveQuad("menutitle.png", 0, 0, 256, 166); // Create background quad for rendering. mBg->SetHotSpot(128,50); - genNbCardsStr(); - - if(currentState == MENU_STATE_MAJOR_MAINMENU){ - currentState = currentState | MENU_STATE_MINOR_FADEIN; - } + if (MENU_STATE_MAJOR_MAINMENU == currentState) + currentState = currentState | MENU_STATE_MINOR_FADEIN; wallpaper = ""; }