(menu_setting.c) Prevent dereference by null

This commit is contained in:
twinaphex 2016-09-29 04:28:31 +02:00
parent ee087498a3
commit 0ce63a3f94

View File

@ -1591,12 +1591,14 @@ void general_write_handler(void *data)
break; break;
case MENU_ENUM_LABEL_LOG_VERBOSITY: case MENU_ENUM_LABEL_LOG_VERBOSITY:
{ {
if (setting->value.target.boolean && *setting->value.target.boolean) if (setting
&& setting->value.target.boolean
&& *setting->value.target.boolean)
verbosity_enable(); verbosity_enable();
else else
verbosity_disable(); verbosity_disable();
if (*setting->value.target.boolean) if (setting && *setting->value.target.boolean)
retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_VERBOSITY); retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_VERBOSITY);
else else
retroarch_override_setting_unset(RARCH_OVERRIDE_SETTING_VERBOSITY); retroarch_override_setting_unset(RARCH_OVERRIDE_SETTING_VERBOSITY);