Fix crash with the null menu driver and Qt frontend.

When failing to load content in the Qt companion ui while using the
null menu driver RetroArch will crash.

Now it just prints that it failed to load content in the Qt ui.
This commit is contained in:
orbea 2019-01-08 22:55:32 -08:00
parent 01b2b9c3a6
commit 248c944ff8

View File

@ -281,12 +281,14 @@ int generic_action_ok_displaylist_push(const char *path,
enum msg_hash_enums enum_idx = MSG_UNKNOWN; enum msg_hash_enums enum_idx = MSG_UNKNOWN;
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0); file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
char *menu_driver = settings->arrays.menu_driver;
menu_displaylist_info_init(&info); menu_displaylist_info_init(&info);
info.list = menu_stack; info.list = menu_stack;
if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu)) if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu) ||
string_is_equal(menu_driver, "null"))
goto end; goto end;
tmp[0] = '\0'; tmp[0] = '\0';