From 0cf7428f858fa0f621dd2d12914831e3cd71d8ea Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Mon, 31 Aug 2015 16:34:24 +0100 Subject: [PATCH] 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. --- src/order_gui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 0f86f44689..44a7a5116a 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -770,7 +770,9 @@ public: this->CreateNestedTree(); this->vscroll = this->GetScrollbar(WID_O_SCROLLBAR); - this->GetWidget(WID_O_SEL_OCCUPANCY)->SetDisplayedPlane(SZSP_NONE); + if (v->owner == _local_company) { + this->GetWidget(WID_O_SEL_OCCUPANCY)->SetDisplayedPlane(SZSP_NONE); + } this->FinishInitNested(v->index); if (v->owner == _local_company) { this->DisableWidget(WID_O_EMPTY);