Changeset - r27999:1b33a7ee27ac
[Not reviewed]
master
0 1 0
Jonathan G Rennison - 14 months ago 2023-10-17 20:25:48
j.g.rennison@gmail.com
Fix: Assertion in sprite aligner window (#11371)

When clicking sprite number after re-opening window having previously used sprite picker tool
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/newgrf_debug_gui.cpp
Show inline comments
 
@@ -823,12 +823,13 @@ struct SpriteAlignerWindow : Window {
 
	static bool crosshair;
 

	
 
	SpriteAlignerWindow(WindowDesc *desc, WindowNumber wno) : Window(desc)
 
	{
 
		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);
 
		this->SetWidgetLoweredState(WID_SA_CROSSHAIR, SpriteAlignerWindow::crosshair);
 

	
 
		/* Oh yes, we assume there is at least one normal sprite! */
0 comments (0 inline, 0 general)