mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
prevent null reference rendering achievement list while closing emulator
This commit is contained in:
parent
1d7cae2ceb
commit
ff3b033815
@ -1133,12 +1133,12 @@ void rcheevos_get_achievement_state(unsigned index, char *buffer, size_t buffer_
|
|||||||
if (index < rcheevos_locals.patchdata.core_count)
|
if (index < rcheevos_locals.patchdata.core_count)
|
||||||
{
|
{
|
||||||
enum_idx = MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ENTRY;
|
enum_idx = MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ENTRY;
|
||||||
cheevo = &rcheevos_locals.core[index];
|
cheevo = rcheevos_locals.core ? &rcheevos_locals.core[index] : NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
enum_idx = MENU_ENUM_LABEL_VALUE_CHEEVOS_UNOFFICIAL_ENTRY;
|
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)
|
if (!cheevo || !cheevo->trigger)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user