mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +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];
|
||||
opt->mItems.Clear();
|
||||
}
|
||||
opt->mTitle.Format("Configure %s", joy->GetName().GetChars());
|
||||
|
||||
if (joy == NULL)
|
||||
{
|
||||
opt->mTitle = "Configure Controller";
|
||||
it = new FOptionMenuItemStaticText("Invalid controller specified for menu", false);
|
||||
opt->mItems.Push(it);
|
||||
}
|
||||
else
|
||||
{
|
||||
opt->mTitle.Format("Configure %s", joy->GetName().GetChars());
|
||||
|
||||
SELECTED_JOYSTICK = joy;
|
||||
|
||||
it = new FOptionMenuSliderJoySensitivity("Overall sensitivity", 0, 2, 0.1, 3);
|
||||
|
|
Loading…
Reference in a new issue