Changeset - r28698:47900b4bc4c6
[Not reviewed]
master
0 1 0
Peter Nelson - 10 months ago 2024-02-06 12:53:23
peter1138@openttd.org
Fix #12012: Crash when opening orders of another company. (#12013)

Orders window changes tooltip depending on vehicle type but did check if widget exists.
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/order_gui.cpp
Show inline comments
 
@@ -785,7 +785,9 @@ public:
 

	
 
		this->CreateNestedTree();
 
		this->vscroll = this->GetScrollbar(WID_O_SCROLLBAR);
 
		this->GetWidget<NWidgetCore>(WID_O_DEPOT_ACTION)->tool_tip = STR_ORDER_TRAIN_DEPOT_ACTION_TOOLTIP + v->type;
 
		if (NWidgetCore *nwid = this->GetWidget<NWidgetCore>(WID_O_DEPOT_ACTION); nwid != nullptr) {
 
			nwid->tool_tip = STR_ORDER_TRAIN_DEPOT_ACTION_TOOLTIP + v->type;
 
		}
 
		this->FinishInitNested(v->index);
 

	
 
		this->selected_order = -1;
0 comments (0 inline, 0 general)