(Menu) Check if driver.video->restart is bound first

This commit is contained in:
twinaphex 2013-11-18 03:25:50 +01:00
parent 2fab149ae4
commit 58d8079704

View File

@ -1108,8 +1108,9 @@ int menu_set_settings(void *data, unsigned setting, unsigned action)
g_extern.lifecycle_state &= ~(1ULL << MODE_VIDEO_PAL_ENABLE);
g_extern.lifecycle_state &= ~(1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE);
}
driver.video->restart();
if (driver.video->restart)
driver.video->restart();
if (menu_ctx && menu_ctx->free_assets)
menu_ctx->free_assets(rgui);
if (menu_ctx && menu_ctx->init_assets)
@ -1129,7 +1130,8 @@ int menu_set_settings(void *data, unsigned setting, unsigned action)
else
g_extern.lifecycle_state |= (1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE);
driver.video->restart();
if (driver.video->restart)
driver.video->restart();
if (menu_ctx && menu_ctx->free_assets)
menu_ctx->free_assets(rgui);
if (menu_ctx && menu_ctx->init_assets)
@ -1141,7 +1143,8 @@ int menu_set_settings(void *data, unsigned setting, unsigned action)
{
g_extern.lifecycle_state &= ~(1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE);
driver.video->restart();
if (driver.video->restart)
driver.video->restart();
if (menu_ctx && menu_ctx->free_assets)
menu_ctx->free_assets(rgui);
if (menu_ctx && menu_ctx->init_assets)