(svn r15354) -Fix (r14803): first shared of a vehicle could be NULL making it impossible to (share-)clone the vehicle.

This commit is contained in:
rubidium
2009-02-05 15:58:42 +00:00
parent b42f87d245
commit 20cb3a581c
2 changed files with 2 additions and 3 deletions

View File

@@ -1427,9 +1427,8 @@ void CheckOrders(const Vehicle *v)
/* Do we only have 1 station in our order list? */
if (n_st < 2 && problem_type == -1) problem_type = 0;
assert(v->orders.list); // otherwise the check for v->FirstShared() != v would have been true
#ifndef NDEBUG
v->orders.list->DebugCheckSanity();
if (v->orders.list != NULL) v->orders.list->DebugCheckSanity();
#endif
/* We don't have a problem */