mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
Merge pull request #10398 from Jamiras/cheevos_null_check
[cheevos] prevent null reference rendering achievement list while closing application
This commit is contained in:
commit
5b5a086fd3
@ -1133,12 +1133,12 @@ void rcheevos_get_achievement_state(unsigned index, char *buffer, size_t buffer_
|
||||
if (index < rcheevos_locals.patchdata.core_count)
|
||||
{
|
||||
enum_idx = MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ENTRY;
|
||||
cheevo = &rcheevos_locals.core[index];
|
||||
cheevo = rcheevos_locals.core ? &rcheevos_locals.core[index] : NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
enum_idx = MENU_ENUM_LABEL_VALUE_CHEEVOS_UNOFFICIAL_ENTRY;
|
||||
cheevo = &rcheevos_locals.unofficial[index - rcheevos_locals.patchdata.core_count];
|
||||
cheevo = rcheevos_locals.unofficial ? &rcheevos_locals.unofficial[index - rcheevos_locals.patchdata.core_count] : NULL;
|
||||
}
|
||||
|
||||
if (!cheevo || !cheevo->trigger)
|
||||
|
Loading…
x
Reference in New Issue
Block a user