Fix CUnit::StoreOrder.
This commit is contained in:
parent
c870768c3a
commit
a176346d27
1 changed files with 7 additions and 7 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue