Fix crashes when changing cores.
When switching cores it was possible to hit core_unload_game and core_load twice which potentially led to crashes when switching some cores without closing content before loading the new core. Fixes https://github.com/libretro/RetroArch/issues/4107
This commit is contained in:
parent
13ccf4d408
commit
32586bc316
|
@ -2020,9 +2020,6 @@ bool command_event(enum event_command cmd, void *data)
|
||||||
path_clear(RARCH_PATH_CORE);
|
path_clear(RARCH_PATH_CORE);
|
||||||
rarch_ctl(RARCH_CTL_SYSTEM_INFO_FREE, NULL);
|
rarch_ctl(RARCH_CTL_SYSTEM_INFO_FREE, NULL);
|
||||||
#endif
|
#endif
|
||||||
core_unload_game();
|
|
||||||
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
|
||||||
core_unload();
|
|
||||||
#ifdef HAVE_DISCORD
|
#ifdef HAVE_DISCORD
|
||||||
if (discord_is_inited)
|
if (discord_is_inited)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue