# HG changeset patch # User rubidium # Date 2013-11-22 21:42:47 # Node ID deac4fa0133a93e049d8ee3dd0fc1a8eee9f4a52 # Parent 3f36dc1d96add09459a29a5bfaff3bcb126837c0 (svn r26049) -Codechange: remove some dead code as order can't be NULL there diff --git a/src/order_gui.cpp b/src/order_gui.cpp --- 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;