mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
GetSelectedSize() needs to check for a valid selection.
- With mouse navigation, there's no guarantee that there even is a selected item.
This commit is contained in:
parent
a7a7d5d6b3
commit
e3741c8097
1 changed files with 1 additions and 1 deletions
|
@ -348,7 +348,7 @@ void M_InitVideoModesMenu ()
|
||||||
static bool GetSelectedSize (int *width, int *height)
|
static bool GetSelectedSize (int *width, int *height)
|
||||||
{
|
{
|
||||||
FOptionMenuDescriptor *opt = GetVideoModeMenu();
|
FOptionMenuDescriptor *opt = GetVideoModeMenu();
|
||||||
if (opt != NULL)
|
if (opt != NULL && (unsigned)opt->mSelectedItem < opt->mItems.Size())
|
||||||
{
|
{
|
||||||
int line = opt->mSelectedItem;
|
int line = opt->mSelectedItem;
|
||||||
int hsel;
|
int hsel;
|
||||||
|
|
Loading…
Reference in a new issue