mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
- fixed: The class selection menu crashed when no item in the menu was selected.
SVN r2786 (trunk)
This commit is contained in:
parent
d8fd72e19a
commit
5dfc57336e
1 changed files with 10 additions and 6 deletions
|
@ -424,14 +424,18 @@ void FListMenuItemPlayerDisplay::SetPlayerClass(int classnum, bool force)
|
|||
|
||||
bool FListMenuItemPlayerDisplay::UpdatePlayerClass()
|
||||
{
|
||||
int classnum;
|
||||
FName seltype = mOwner->mItems[mOwner->mSelectedItem]->GetAction(&classnum);
|
||||
if (mOwner->mSelectedItem >= 0)
|
||||
{
|
||||
int classnum;
|
||||
FName seltype = mOwner->mItems[mOwner->mSelectedItem]->GetAction(&classnum);
|
||||
|
||||
if (seltype != NAME_Episodemenu) return false;
|
||||
if (PlayerClasses.Size() == 0) return false;
|
||||
if (seltype != NAME_Episodemenu) return false;
|
||||
if (PlayerClasses.Size() == 0) return false;
|
||||
|
||||
SetPlayerClass(classnum);
|
||||
return true;
|
||||
SetPlayerClass(classnum);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
|
Loading…
Reference in a new issue