Prevent crash

This commit is contained in:
twinaphex 2015-12-11 14:30:57 +01:00
parent adc359ec7a
commit 9e9e6bd8b4

View File

@ -292,7 +292,9 @@ static void menu_driver_toggle(bool latch)
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
if (menu_driver->toggle)
menu_driver->toggle(menu_driver_data->userdata, latch);
menu_driver->toggle(
menu_driver_data ? menu_driver_data->userdata : NULL,
latch);
if (latch)
menu_driver_ctl(RARCH_MENU_CTL_SET_ALIVE, NULL);