mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 12:11:25 +00:00
- fixed VM abort when entering search menu
https://forum.zdoom.org/viewtopic.php?t=65833
This commit is contained in:
parent
06ad60718c
commit
526a576d89
1 changed files with 11 additions and 7 deletions
|
@ -107,15 +107,19 @@ class OptionMenu : Menu
|
||||||
mDesc = desc;
|
mDesc = desc;
|
||||||
DontDim = desc.mDontDim;
|
DontDim = desc.mDontDim;
|
||||||
|
|
||||||
let last = mDesc.mItems[mDesc.mItems.size() - 1];
|
let itemCount = mDesc.mItems.size();
|
||||||
bool lastIsText = (last is "OptionMenuItemStaticText");
|
if (itemCount > 0)
|
||||||
if (lastIsText)
|
|
||||||
{
|
{
|
||||||
String text = last.mLabel;
|
let last = mDesc.mItems[itemCount - 1];
|
||||||
bool lastIsSpace = (text == "" || text == " ");
|
bool lastIsText = (last is "OptionMenuItemStaticText");
|
||||||
if (lastIsSpace)
|
if (lastIsText)
|
||||||
{
|
{
|
||||||
mDesc.mItems.Pop();
|
String text = last.mLabel;
|
||||||
|
bool lastIsSpace = (text == "" || text == " ");
|
||||||
|
if (lastIsSpace)
|
||||||
|
{
|
||||||
|
mDesc.mItems.Pop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue