Fix crash in sprite aligner window

When clicking sprite number after re-opening window
having previously used sprite picker tool
This commit is contained in:
Jonathan G Rennison
2023-10-15 21:51:41 +01:00
parent adbbbd14b6
commit b9654985ad

View File

@@ -1276,6 +1276,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);