mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Fixes segfault with environ SHUTDOWN with prboom
This commit is contained in:
parent
189458f661
commit
ba938da348
@ -2385,7 +2385,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
if (menu)
|
||||
menu->load_no_content = false;
|
||||
#endif
|
||||
rarch_main_data_free();
|
||||
rarch_main_data_deinit();
|
||||
|
||||
*global->fullpath = '\0';
|
||||
|
||||
@ -2591,6 +2591,9 @@ bool rarch_main_command(unsigned cmd)
|
||||
core_info_list_free(global->core_info);
|
||||
global->core_info = NULL;
|
||||
break;
|
||||
case RARCH_CMD_DATA_RUNLOOP_FREE:
|
||||
rarch_main_data_free();
|
||||
break;
|
||||
case RARCH_CMD_CORE_INFO_INIT:
|
||||
rarch_main_command(RARCH_CMD_CORE_INFO_DEINIT);
|
||||
|
||||
|
@ -193,6 +193,7 @@ enum basic_event
|
||||
RARCH_CMD_REMAPPING_DEINIT,
|
||||
RARCH_CMD_VOLUME_UP,
|
||||
RARCH_CMD_VOLUME_DOWN,
|
||||
RARCH_CMD_DATA_RUNLOOP_FREE,
|
||||
};
|
||||
|
||||
enum action_state
|
||||
|
@ -486,6 +486,8 @@ void rarch_main_state_free(void);
|
||||
|
||||
void rarch_main_global_free(void);
|
||||
|
||||
void rarch_main_data_deinit(void);
|
||||
|
||||
void rarch_main_data_free(void);
|
||||
|
||||
void rarch_main_data_init_queues(void);
|
||||
|
@ -778,7 +778,7 @@ static void data_runloop_thread_deinit(data_runloop_t *runloop)
|
||||
}
|
||||
#endif
|
||||
|
||||
void rarch_main_data_free(void)
|
||||
void rarch_main_data_deinit(void)
|
||||
{
|
||||
data_runloop_t *data_runloop = (data_runloop_t*)rarch_main_data_get_ptr();
|
||||
|
||||
@ -794,8 +794,15 @@ void rarch_main_data_free(void)
|
||||
#endif
|
||||
|
||||
data_runloop->inited = false;
|
||||
}
|
||||
|
||||
void rarch_main_data_free(void)
|
||||
{
|
||||
data_runloop_t *data_runloop = (data_runloop_t*)rarch_main_data_get_ptr();
|
||||
|
||||
if (data_runloop)
|
||||
free(data_runloop);
|
||||
data_runloop = NULL;
|
||||
}
|
||||
|
||||
static void data_runloop_iterate(bool is_thread, data_runloop_t *runloop)
|
||||
@ -915,6 +922,7 @@ static data_runloop_t *rarch_main_data_new(void)
|
||||
|
||||
void rarch_main_data_clear_state(void)
|
||||
{
|
||||
rarch_main_data_deinit();
|
||||
rarch_main_data_free();
|
||||
g_data_runloop = rarch_main_data_new();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user