- In UpdateJoystickConfigMenu(), do not access joy before checking if it's NULL.

SVN r4019 (trunk)
This commit is contained in:
Randy Heit 2013-01-03 03:12:07 +00:00
parent 424fcb4cba
commit 22e52776e3

View file

@ -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);