mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-10-19 08:55:33 +00:00
RetroAchievements: Avoid uninitialized memory access
Avoid creating and then destroying a leaderboard list when game is null, as doing so causes an access to uninitialized memory due to a bug in rcheevos. This can be triggered by starting a game with an invalid or expired login token.
This commit is contained in:
parent
489952cf89
commit
85a89eb420
@ -1027,6 +1027,9 @@ void AchievementManager::LoadGameCallback(int result, const char* error_message,
|
|||||||
OSD::Color::RED);
|
OSD::Color::RED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (game == nullptr)
|
||||||
|
return;
|
||||||
|
|
||||||
rc_client_set_read_memory_function(instance.m_client, MemoryPeeker);
|
rc_client_set_read_memory_function(instance.m_client, MemoryPeeker);
|
||||||
instance.FetchGameBadges();
|
instance.FetchGameBadges();
|
||||||
instance.m_system.store(&Core::System::GetInstance(), std::memory_order_release);
|
instance.m_system.store(&Core::System::GetInstance(), std::memory_order_release);
|
||||||
|
Loading…
Reference in New Issue
Block a user