From 1b924f194fe07692e82f6d63696b74968d254cf2 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 22 Nov 2013 21:42:47 +0000 Subject: [PATCH] (svn r26049) -Codechange: remove some dead code as order can't be NULL there --- src/order_gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 4b8a46c949..0645ecb68c 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -1060,8 +1060,8 @@ public: } OrderConditionVariable ocv = order->GetConditionVariable(); /* Set the strings for the dropdown boxes. */ - this->GetWidget(WID_O_COND_VARIABLE)->widget_data = STR_ORDER_CONDITIONAL_LOAD_PERCENTAGE + (order == NULL ? 0 : ocv); - this->GetWidget(WID_O_COND_COMPARATOR)->widget_data = _order_conditional_condition[order == NULL ? 0 : order->GetConditionComparator()]; + this->GetWidget(WID_O_COND_VARIABLE)->widget_data = STR_ORDER_CONDITIONAL_LOAD_PERCENTAGE + ocv; + this->GetWidget(WID_O_COND_COMPARATOR)->widget_data = _order_conditional_condition[order->GetConditionComparator()]; this->SetWidgetDisabledState(WID_O_COND_COMPARATOR, ocv == OCV_UNCONDITIONALLY); this->SetWidgetDisabledState(WID_O_COND_VALUE, ocv == OCV_REQUIRES_SERVICE || ocv == OCV_UNCONDITIONALLY); break;