From 907ba1292fc5f9879a82722a6df56148e82dc588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 30 Nov 2025 10:25:34 +0100 Subject: [PATCH] Crashfix and warning fix, thanks droplet and oltolm --- UI/RetroAchievementScreens.cpp | 5 +++++ UI/SimpleDialogScreen.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UI/RetroAchievementScreens.cpp b/UI/RetroAchievementScreens.cpp index bede49f309..aee42197c9 100644 --- a/UI/RetroAchievementScreens.cpp +++ b/UI/RetroAchievementScreens.cpp @@ -770,6 +770,11 @@ void GameAchievementSummaryView::Draw(UIContext &dc) { void GameAchievementSummaryView::GetContentDimensionsBySpec(const UIContext &dc, UI::MeasureSpec horiz, UI::MeasureSpec vert, float &w, float &h) const { const rc_client_game_t *client_game = rc_client_get_game_info(Achievements::GetClient()); + if (!client_game) { + w = 0; + h = 0; + return; + } float layoutWidth = layoutParams_->width; if (layoutWidth < 0) { // If there's no size, let's grow as big as we want. diff --git a/UI/SimpleDialogScreen.cpp b/UI/SimpleDialogScreen.cpp index e43d36ba39..8f78b3d2bf 100644 --- a/UI/SimpleDialogScreen.cpp +++ b/UI/SimpleDialogScreen.cpp @@ -36,7 +36,7 @@ void UITwoPaneBaseDialogScreen::CreateViews() { BeforeCreateViews(); - auto createContentViews = [this, portrait](UI::ViewGroup *parent) { + auto createContentViews = [this](UI::ViewGroup *parent) { if (flags_ & TwoPaneFlags::ContentsCanScroll) { Margins margins(8, 8, 8, 0); if (flags_ & TwoPaneFlags::SettingsToTheRight) {