(svn r6728) -Fix r6651: solved issue where moving rail vehicles in a depot could read from a NULL pointer
authorbjarni
Tue, 10 Oct 2006 17:53:08 +0000
changeset 4806 a75776d5c5a4
parent 4805 a03106c010b3
child 4807 3872b25b9a3f
(svn r6728) -Fix r6651: solved issue where moving rail vehicles in a depot could read from a NULL pointer
train_cmd.c
--- a/train_cmd.c	Tue Oct 10 17:19:21 2006 +0000
+++ b/train_cmd.c	Tue Oct 10 17:53:08 2006 +0000
@@ -1137,7 +1137,7 @@
 
 		if (dst == NULL) {
 			/* We make a new line in the depot, so we know already that we invalidate the window data */
-			InvalidateWindowData(WC_VEHICLE_DEPOT, src_head->tile);
+			InvalidateWindowData(WC_VEHICLE_DEPOT, src->tile);
 
 			// move the train to an empty line. for locomotives, we set the type to TS_Front. for wagons, 4.
 			if (IsTrainEngine(src)) {