Select something by default in challenges screen

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5364 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-05-03 17:31:03 +00:00
parent 0aef68f6ba
commit b1e7e6e15c

View File

@ -96,8 +96,14 @@ void ChallengesScreen::init()
}
w->updateItemDisplay();
w->updateItemDisplay();
if (w->getItems().empty())
{
fprintf(stderr, "Error, no challenge!\n");
return;
}
w->setSelection(0 /* whatever is first */, PLAYER_ID_GAME_MASTER, true /* focus it */);
}
// ------------------------------------------------------------------------------------------------------