changeset 4806:04002cb8932c draft

(svn r6728) -Fix r6651: solved issue where moving rail vehicles in a depot could read from a NULL pointer
author bjarni <bjarni@openttd.org>
date Tue, 10 Oct 2006 17:53:08 +0000
parents e7d602200399
children 280259cad5ad
files train_cmd.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -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)) {