mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
- In UpdateJoystickConfigMenu(), do not access joy before checking if it's NULL.
SVN r4019 (trunk)
This commit is contained in:
parent
424fcb4cba
commit
22e52776e3
1 changed files with 3 additions and 2 deletions
|
@ -280,15 +280,16 @@ FOptionMenuDescriptor *UpdateJoystickConfigMenu(IJoystickConfig *joy)
|
||||||
delete opt->mItems[i];
|
delete opt->mItems[i];
|
||||||
opt->mItems.Clear();
|
opt->mItems.Clear();
|
||||||
}
|
}
|
||||||
opt->mTitle.Format("Configure %s", joy->GetName().GetChars());
|
|
||||||
|
|
||||||
if (joy == NULL)
|
if (joy == NULL)
|
||||||
{
|
{
|
||||||
|
opt->mTitle = "Configure Controller";
|
||||||
it = new FOptionMenuItemStaticText("Invalid controller specified for menu", false);
|
it = new FOptionMenuItemStaticText("Invalid controller specified for menu", false);
|
||||||
opt->mItems.Push(it);
|
opt->mItems.Push(it);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
opt->mTitle.Format("Configure %s", joy->GetName().GetChars());
|
||||||
|
|
||||||
SELECTED_JOYSTICK = joy;
|
SELECTED_JOYSTICK = joy;
|
||||||
|
|
||||||
it = new FOptionMenuSliderJoySensitivity("Overall sensitivity", 0, 2, 0.1, 3);
|
it = new FOptionMenuSliderJoySensitivity("Overall sensitivity", 0, 2, 0.1, 3);
|
||||||
|
|
Loading…
Reference in a new issue