diff --git a/menu/drivers/nuklear.c b/menu/drivers/nuklear.c index a63069692b..42bb689f21 100644 --- a/menu/drivers/nuklear.c +++ b/menu/drivers/nuklear.c @@ -128,8 +128,13 @@ static void nk_menu_context_reset_textures(nk_menu_handle_t *nk, for (i = 0; i < NK_TEXTURE_LAST; i++) { - struct texture_image ti = {0}; - char path[PATH_MAX_LENGTH] = {0}; + struct texture_image ti; + char path[PATH_MAX_LENGTH]; + + ti.width = 0; + ti.height = 0; + ti.pixels = NULL; + path[0] = '\0'; switch(i) { diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 04dfc41d5a..8eac35495f 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1450,7 +1450,7 @@ static void xmb_context_reset_horizontal_list( char sysname[PATH_MAX_LENGTH]; char texturepath[PATH_MAX_LENGTH]; char content_texturepath[PATH_MAX_LENGTH]; - struct texture_image ti = {0}; + struct texture_image ti; const char *path = NULL; xmb_node_t *node = xmb_get_userdata_from_horizontal_list(xmb, i); @@ -1483,6 +1483,10 @@ static void xmb_context_reset_horizontal_list( file_path_str(FILE_PATH_PNG_EXTENSION), sizeof(texturepath)); + ti.width = 0; + ti.height = 0; + ti.pixels = NULL; + if (image_texture_load(&ti, texturepath)) { if(ti.pixels) diff --git a/menu/menu_display.c b/menu/menu_display.c index 7c95283887..e9042cc318 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -844,10 +844,16 @@ void menu_display_set_alpha(float *color, float alpha_value) void menu_display_reset_textures_list(const char *texture_path, const char *iconpath, uintptr_t *item) { - struct texture_image ti = {0}; - char path[PATH_MAX_LENGTH] = {0}; + struct texture_image ti; + char path[PATH_MAX_LENGTH]; - if (texture_path != NULL) + path[0] = '\0'; + + ti.width = 0; + ti.height = 0; + ti.pixels = NULL; + + if (!string_is_empty(texture_path)) fill_pathname_join(path, iconpath, texture_path, sizeof(path)); if (string_is_empty(path) || !path_file_exists(path))