mirror of
https://github.com/libretro/RetroArch
synced 2025-04-03 10:21:31 +00:00
make sure texture pointer is null when load fails
This commit is contained in:
parent
4a9e1e6c7e
commit
4093616e09
@ -54,7 +54,7 @@ void cheevos_set_menu_badge(int index, const char *badge, bool locked)
|
|||||||
uintptr_t cheevos_get_menu_badge_texture(int index)
|
uintptr_t cheevos_get_menu_badge_texture(int index)
|
||||||
{
|
{
|
||||||
if (index < CHEEVOS_MENU_BADGE_LIMIT)
|
if (index < CHEEVOS_MENU_BADGE_LIMIT)
|
||||||
return cheevos_badge_menu_texture_list[index];
|
return cheevos_badge_menu_texture_list[index];
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -65,7 +65,7 @@ uintptr_t cheevos_get_badge_texture(const char *badge, bool locked)
|
|||||||
{
|
{
|
||||||
char badge_file[24];
|
char badge_file[24];
|
||||||
char fullpath[PATH_MAX_LENGTH];
|
char fullpath[PATH_MAX_LENGTH];
|
||||||
uintptr_t tex;
|
uintptr_t tex = 0;
|
||||||
|
|
||||||
if (!badge)
|
if (!badge)
|
||||||
return 0;
|
return 0;
|
||||||
@ -76,8 +76,9 @@ uintptr_t cheevos_get_badge_texture(const char *badge, bool locked)
|
|||||||
PATH_MAX_LENGTH * sizeof(char),
|
PATH_MAX_LENGTH * sizeof(char),
|
||||||
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES);
|
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES);
|
||||||
|
|
||||||
gfx_display_reset_textures_list(badge_file, fullpath,
|
if (!gfx_display_reset_textures_list(badge_file, fullpath,
|
||||||
&tex, TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL);
|
&tex, TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL))
|
||||||
|
tex = 0;
|
||||||
|
|
||||||
return tex;
|
return tex;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user