diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 5f5cc09bef..cc71dfe0c7 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -12158,12 +12158,15 @@ static void materialui_refresh_thumbnail_image(void *userdata, size_t i) gfx_thumbnail_reset(&node->thumbnails.secondary); } - /* No need to actually request thumbnails here - * > Just set delay timer to the current maximum - * value, and thumbnails will be processed via - * regular means on the next frame */ - node->thumbnails.primary.delay_timer = stream_delay; - node->thumbnails.secondary.delay_timer = stream_delay; + if (node) + { + /* No need to actually request thumbnails here + * > Just set delay timer to the current maximum + * value, and thumbnails will be processed via + * regular means on the next frame */ + node->thumbnails.primary.delay_timer = stream_delay; + node->thumbnails.secondary.delay_timer = stream_delay; + } } } diff --git a/retroarch.c b/retroarch.c index 4d696af619..de9120e734 100644 --- a/retroarch.c +++ b/retroarch.c @@ -4227,7 +4227,8 @@ bool command_event(enum event_command cmd, void *data) settings->paths.directory_runtime_log, settings->paths.directory_playlist); - if ( runloop_st->flags & RUNLOOP_FLAG_CORE_RUNNING + if ( runloop_st + && (runloop_st->flags & RUNLOOP_FLAG_CORE_RUNNING) && settings->bools.savestate_auto_save) { command_event_save_auto_state(); diff --git a/runahead.c b/runahead.c index e55148e5c4..a3dd75be53 100644 --- a/runahead.c +++ b/runahead.c @@ -252,7 +252,6 @@ static bool write_file_with_random_name(char **temp_dll_path, const char *tmp_path, const void* data, ssize_t dataSize) { int i; - size_t ext_len; char number_buf[32]; bool okay = false; const char *prefix = "tmp"; @@ -270,14 +269,16 @@ static bool write_file_with_random_name(char **temp_dll_path, else ext = (char*)calloc(1,1); - ext_len = strlen(ext); - - if (ext_len > 0) + if (ext) { - strcat_alloc(&ext, "."); - memmove(ext + 1, ext, ext_len); - ext[0] = '.'; - ext_len++; + size_t ext_len = strlen(ext); + if (ext_len > 0) + { + strcat_alloc(&ext, "."); + memmove(ext + 1, ext, ext_len); + ext[0] = '.'; + ext_len++; + } } /* Try up to 30 'random' filenames before giving up */