--- a/src/order_cmd.cpp Thu Apr 19 14:43:25 2007 +0000
+++ b/src/order_cmd.cpp Thu Apr 19 14:48:10 2007 +0000
@@ -463,6 +463,7 @@
*/
static void RemoveSharedOrderVehicleList(Vehicle *v)
{
+ assert(v->orders != NULL);
WindowClass window_class = WC_NONE;
switch (v->type) {
@@ -1159,7 +1160,7 @@
/* If we are the only one left in the Shared Order Vehicle List,
* remove it, as we are no longer a Shared Order Vehicle */
- if (u->prev_shared == NULL && u->next_shared == NULL) RemoveSharedOrderVehicleList(u);
+ if (u->prev_shared == NULL && u->next_shared == NULL && u->orders != NULL) RemoveSharedOrderVehicleList(u);
/* We only need to update this-one, because if there is a third
* vehicle which shares the same order-list, nothing will change. If