Prevent crash on calling RARCH_MENU_CTL_CONTEXT_DESTROY
This commit is contained in:
parent
99d21fd701
commit
b077113aff
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue