mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Fix crash when toggling menu switch when we're in 'Core Updater' screen
This commit is contained in:
parent
5b6030c2c7
commit
ee3442b962
@ -1563,6 +1563,9 @@ int cb_core_updater_list(void *data_, size_t len)
|
||||
if (!data)
|
||||
return -1;
|
||||
|
||||
if (core_buf)
|
||||
free(core_buf);
|
||||
|
||||
core_buf = (char*)malloc(len * sizeof(char));
|
||||
|
||||
if (!core_buf)
|
||||
@ -1584,9 +1587,6 @@ static int deferred_push_core_updater_list(void *data, void *userdata,
|
||||
|
||||
print_buf_lines(list, core_buf, core_len, MENU_FILE_DOWNLOAD_CORE);
|
||||
|
||||
if (core_buf)
|
||||
free(core_buf);
|
||||
|
||||
menu_list_populate_generic(list, path, label, type);
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user