mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Robustness fixes
This commit is contained in:
parent
16cce08fa7
commit
572b59d417
@ -1668,7 +1668,10 @@ static void free_temporary_content(void)
|
||||
static void main_clear_state_drivers(void)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
bool inited = global->main_is_init;
|
||||
bool inited = false;
|
||||
if (!global)
|
||||
return;
|
||||
inited = global->main_is_init;
|
||||
if (!inited)
|
||||
return;
|
||||
|
||||
|
@ -981,6 +981,9 @@ void rarch_main_msg_queue_push(const char *msg, unsigned prio, unsigned duration
|
||||
void rarch_main_msg_queue_free(void)
|
||||
{
|
||||
runloop_t *runloop = rarch_main_get_ptr();
|
||||
if (!runloop)
|
||||
return;
|
||||
|
||||
if (runloop->msg_queue)
|
||||
msg_queue_free(runloop->msg_queue);
|
||||
runloop->msg_queue = NULL;
|
||||
@ -989,6 +992,9 @@ void rarch_main_msg_queue_free(void)
|
||||
void rarch_main_msg_queue_init(void)
|
||||
{
|
||||
runloop_t *runloop = rarch_main_get_ptr();
|
||||
if (!runloop)
|
||||
return;
|
||||
|
||||
if (!runloop->msg_queue)
|
||||
rarch_assert(runloop->msg_queue = msg_queue_new(8));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user