From 22e52776e336141e23a32d64ad9ab80bb4fc8308 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 3 Jan 2013 03:12:07 +0000 Subject: [PATCH] - In UpdateJoystickConfigMenu(), do not access joy before checking if it's NULL. SVN r4019 (trunk) --- src/menu/joystickmenu.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/menu/joystickmenu.cpp b/src/menu/joystickmenu.cpp index 19f87e1584..6be7288657 100644 --- a/src/menu/joystickmenu.cpp +++ b/src/menu/joystickmenu.cpp @@ -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);