From 2d82e223039b6f1facbe73249a07c8125a44ace3 Mon Sep 17 00:00:00 2001 From: "wagic.the.homebrew" Date: Sun, 4 Sep 2011 13:21:10 +0000 Subject: [PATCH] Fixed a bug that prevented the mod "knights and dragons" from starting. --- projects/mtg/src/GameStateMenu.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/projects/mtg/src/GameStateMenu.cpp b/projects/mtg/src/GameStateMenu.cpp index edc736111..d1b32bfea 100644 --- a/projects/mtg/src/GameStateMenu.cpp +++ b/projects/mtg/src/GameStateMenu.cpp @@ -449,12 +449,14 @@ void GameStateMenu::ensureMGuiController() jq->SetColor(ARGB(abs(255),255,255,255)); mFont = WResourceManager::Instance()->GetWFont(Fonts::OPTION_FONT); vectorotherItems = gModRules.menu.other; - mGuiController->Add(NEW OtherMenuItem( - otherItems[0]->mActionId, - mFont, otherItems[0]->mDisplayName, - SCREEN_WIDTH - 64, 2, - jq.get(), jq.get(), otherItems[0]->mKey, false - )); + if (otherItems.size()) { + mGuiController->Add(NEW OtherMenuItem( + otherItems[0]->mActionId, + mFont, otherItems[0]->mDisplayName, + SCREEN_WIDTH - 64, 2, + jq.get(), jq.get(), otherItems[0]->mKey, false + )); + } } } }