mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-15 18:49:51 +01:00
Achievements: Don't crash recreating a leaderboard screen after the game is unloaded
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0eeaeef610
commit
b5b37954b3
1 file changed
+5
@@ -290,6 +290,11 @@ void RetroAchievementsLeaderboardScreen::FetchEntries() {
|
||||
void RetroAchievementsLeaderboardScreen::CreateTabs() {
|
||||
auto ac = GetI18NCategory(I18NCat::ACHIEVEMENTS);
|
||||
const rc_client_leaderboard_t *leaderboard = rc_client_get_leaderboard_info(Achievements::GetClient(), leaderboardID_);
|
||||
if (!leaderboard) {
|
||||
// The game was unloaded. There has to be a tab, though.
|
||||
AddTab("AchievementsLeaderboard", "", [](UI::LinearLayout *parent) {});
|
||||
return;
|
||||
}
|
||||
|
||||
using namespace UI;
|
||||
AddTab("AchievementsLeaderboard", leaderboard->title, [this, leaderboard](UI::LinearLayout *parent) {
|
||||
|
||||
Reference in new issue
Block a user