Only call task_push_image_load if image exists
This commit is contained in:
parent
5be98cc87c
commit
1437d21457
|
@ -1069,8 +1069,10 @@ static int generic_action_ok(const char *path,
|
||||||
|
|
||||||
strlcpy(settings->path.menu_wallpaper,
|
strlcpy(settings->path.menu_wallpaper,
|
||||||
action_path, sizeof(settings->path.menu_wallpaper));
|
action_path, sizeof(settings->path.menu_wallpaper));
|
||||||
task_push_image_load(action_path,
|
|
||||||
menu_display_handle_wallpaper_upload, NULL);
|
if (path_file_exists(action_path))
|
||||||
|
task_push_image_load(action_path,
|
||||||
|
menu_display_handle_wallpaper_upload, NULL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ACTION_OK_LOAD_CORE:
|
case ACTION_OK_LOAD_CORE:
|
||||||
|
|
|
@ -1658,7 +1658,7 @@ static void mui_context_reset(void *data)
|
||||||
menu_display_allocate_white_texture();
|
menu_display_allocate_white_texture();
|
||||||
mui_context_reset_textures(mui);
|
mui_context_reset_textures(mui);
|
||||||
|
|
||||||
if (!string_is_empty(settings->path.menu_wallpaper))
|
if (path_file_exists(settings->path.menu_wallpaper))
|
||||||
task_push_image_load(settings->path.menu_wallpaper,
|
task_push_image_load(settings->path.menu_wallpaper,
|
||||||
menu_display_handle_wallpaper_upload, NULL);
|
menu_display_handle_wallpaper_upload, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -439,8 +439,9 @@ static void nk_menu_context_reset(void *data)
|
||||||
nk_menu_init_device(nk);
|
nk_menu_init_device(nk);
|
||||||
nk_menu_context_load_textures(nk, iconpath);
|
nk_menu_context_load_textures(nk, iconpath);
|
||||||
|
|
||||||
task_push_image_load(settings->path.menu_wallpaper,
|
if (path_file_exists(settings->path.menu_wallpaper))
|
||||||
menu_display_handle_wallpaper_upload, NULL);
|
task_push_image_load(settings->path.menu_wallpaper,
|
||||||
|
menu_display_handle_wallpaper_upload, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nk_menu_context_destroy(void *data)
|
static void nk_menu_context_destroy(void *data)
|
||||||
|
|
Loading…
Reference in New Issue