Merge pull request #2556 from heuripedes/master

(input_overlay) Fix unneeded load and memory leak
This commit is contained in:
Twinaphex 2015-12-13 02:32:45 +01:00
commit fd8bfc4b93

View File

@ -549,6 +549,9 @@ static void input_overlay_loaded(void *task_data, void *user_data, const char *e
goto abort_load;
}
if (!settings->input.overlay_enable)
goto abort_load;
if (!video_driver_overlay_interface(&iface) || !iface)
{
RARCH_ERR("Overlay interface is not present in video driver.\n");
@ -586,7 +589,9 @@ abort_load:
void input_overlay_init(void)
{
input_overlay_free();
rarch_task_push_overlay_load_default(input_overlay_loaded, NULL);
if (config_get_ptr()->input.overlay_enable)
rarch_task_push_overlay_load_default(input_overlay_loaded, NULL);
}
/**