Fix crash in competitor orders GUI.

Fix attempt to set occupancy widget displayed pane in
competitors order GUI, where the occupancy widget is not present.
This commit is contained in:
Jonathan G Rennison
2015-08-31 16:34:24 +01:00
parent 117599ec7f
commit 0cf7428f85

View File

@@ -770,7 +770,9 @@ public:
this->CreateNestedTree();
this->vscroll = this->GetScrollbar(WID_O_SCROLLBAR);
this->GetWidget<NWidgetStacked>(WID_O_SEL_OCCUPANCY)->SetDisplayedPlane(SZSP_NONE);
if (v->owner == _local_company) {
this->GetWidget<NWidgetStacked>(WID_O_SEL_OCCUPANCY)->SetDisplayedPlane(SZSP_NONE);
}
this->FinishInitNested(v->index);
if (v->owner == _local_company) {
this->DisableWidget(WID_O_EMPTY);