Fix CUnit::StoreOrder.

This commit is contained in:
Joris 2012-05-21 14:13:33 +02:00
parent c870768c3a
commit a176346d27

View file

@ -404,16 +404,16 @@ bool CUnit::StoreOrder(COrder *order)
{
Assert(order);
if (this->SavedOrder != NULL) {
if (this->SavedOrder->IsValid() == false) {
delete this->SavedOrder;
this->SavedOrder = NULL;
}
return false;
}
if (order && order->Finished == true) {
return false;
}
if (this->SavedOrder != NULL) {
if (this->SavedOrder->IsValid() == true) {
return false;
}
delete this->SavedOrder;
this->SavedOrder = NULL;
}
// Save current order to come back or to continue it.
this->SavedOrder = order;
return true;