summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2011-11-09 11:44:12 +0000
committeryexo <yexo@openttd.org>2011-11-09 11:44:12 +0000
commite4011426f2a4ae1ccbbced0cc45d22bce2502fe9 (patch)
tree287ee18a7e43d7c1d934d0d41f0511142164e013 /src
parentab86777efa7df7d561206f8ab9f4dc5f4296e609 (diff)
downloadopenttd-e4011426f2a4ae1ccbbced0cc45d22bce2502fe9.tar.xz
(svn r23172) -Fix (r23088) [FS#4831]: crash when looking at orders from a vehicle that's not in your company
Diffstat (limited to 'src')
-rw-r--r--src/order_gui.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 499c3d36d..90e4f8a6f 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -822,7 +822,9 @@ public:
this->CreateNestedTree(desc);
this->vscroll = this->GetScrollbar(ORDER_WIDGET_SCROLLBAR);
this->FinishInitNested(desc, v->index);
- this->DisableWidget(ORDER_WIDGET_EMPTY);
+ if (v->owner == _local_company) {
+ this->DisableWidget(ORDER_WIDGET_EMPTY);
+ }
this->selected_order = -1;
this->order_over = INVALID_VEH_ORDER_ID;