From a1c6923c632911b4485bf8df94a4af2f0e6f153f Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Tue, 17 Oct 2023 21:25:48 +0100 Subject: [PATCH] Fix: Assertion in sprite aligner window (#11371) When clicking sprite number after re-opening window having previously used sprite picker tool --- src/newgrf_debug_gui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/newgrf_debug_gui.cpp b/src/newgrf_debug_gui.cpp index c7fee2751b..db58442914 100644 --- a/src/newgrf_debug_gui.cpp +++ b/src/newgrf_debug_gui.cpp @@ -826,6 +826,7 @@ struct SpriteAlignerWindow : Window { { this->CreateNestedTree(); this->vscroll = this->GetScrollbar(WID_SA_SCROLLBAR); + this->vscroll->SetCount(_newgrf_debug_sprite_picker.sprites.size()); this->FinishInitNested(wno); this->SetWidgetLoweredState(WID_SA_CENTRE, SpriteAlignerWindow::centre);