- fixed: The class selection menu crashed when no item in the menu was selected.

SVN r2786 (trunk)
This commit is contained in:
Christoph Oelckers 2010-09-15 20:11:32 +00:00
parent d8fd72e19a
commit 5dfc57336e

View file

@ -423,6 +423,8 @@ void FListMenuItemPlayerDisplay::SetPlayerClass(int classnum, bool force)
//============================================================================= //=============================================================================
bool FListMenuItemPlayerDisplay::UpdatePlayerClass() bool FListMenuItemPlayerDisplay::UpdatePlayerClass()
{
if (mOwner->mSelectedItem >= 0)
{ {
int classnum; int classnum;
FName seltype = mOwner->mItems[mOwner->mSelectedItem]->GetAction(&classnum); FName seltype = mOwner->mItems[mOwner->mSelectedItem]->GetAction(&classnum);
@ -433,6 +435,8 @@ bool FListMenuItemPlayerDisplay::UpdatePlayerClass()
SetPlayerClass(classnum); SetPlayerClass(classnum);
return true; return true;
} }
return false;
}
//============================================================================= //=============================================================================
// //