cheevos: fix crash entering achievements in quick menu when no client (#17472)

This commit is contained in:
Eric Warmenhoven 2025-01-25 22:10:25 -05:00 committed by GitHub
parent c11d9bee2e
commit b982ff64c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -303,7 +303,7 @@ void rcheevos_menu_populate(void* data)
rcheevos_menu_reset_badges(); rcheevos_menu_reset_badges();
rcheevos_locals->menuitem_count = 0; rcheevos_locals->menuitem_count = 0;
if (rcheevos_locals->client->state.disconnect) if (rcheevos_locals->client && rcheevos_locals->client->state.disconnect)
{ {
menu_entries_append(info->list, menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_SERVER_UNREACHABLE), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_SERVER_UNREACHABLE),