Prevent crash on calling RARCH_MENU_CTL_CONTEXT_DESTROY

This commit is contained in:
twinaphex 2016-02-10 06:49:00 +01:00
parent 99d21fd701
commit b077113aff

View File

@ -696,10 +696,14 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
}
break;
case RARCH_MENU_CTL_CONTEXT_RESET:
if (!menu_driver_ctx)
return true;
if (menu_driver_ctx->context_reset)
menu_driver_ctx->context_reset(menu_userdata);
break;
case RARCH_MENU_CTL_CONTEXT_DESTROY:
if (!menu_driver_ctx)
return true;
if (menu_driver_ctx->context_destroy)
menu_driver_ctx->context_destroy(menu_userdata);
break;