src/vehicle.cpp
changeset 9280 8adb36dcebab
parent 9274 42b67e65f1c2
child 9297 1cb8d7bbdc8a
--- a/src/vehicle.cpp	Sat May 17 20:49:45 2008 +0000
+++ b/src/vehicle.cpp	Sat May 17 20:54:18 2008 +0000
@@ -2805,11 +2805,11 @@
 {
 	if (!ContainsBackup()) return v;
 	if (v != NULL) {
-		ChangeVehicleViewWindow(v, INVALID_VEHICLE);
+		ChangeVehicleViewWindow(v->index, INVALID_VEHICLE);
 		DoCommand(0, v->index, 1, DC_EXEC, GetCmdSellVeh(v));
 	}
 	v = RestoreBackupVehicle(this->vehicles, p);
-	ChangeVehicleViewWindow(INVALID_VEHICLE, v);
+	ChangeVehicleViewWindow(INVALID_VEHICLE, v->index);
 	if (orders != NULL) RestoreVehicleOrdersBruteForce(v, orders);
 	if (economy != NULL) economy->Restore();
 	/* If we stored cargo as well then we should restore it. */