(svn r9528) -Fix r8610: don't try to modify non-existent widgets (many thanks to Bruce Perence, the libefence developer)
authorglx
Fri, 30 Mar 2007 21:58:38 +0000
changeset 6894 02bad4ca936e
parent 6893 bd207f10e8b5
child 6895 a86d6390246a
(svn r9528) -Fix r8610: don't try to modify non-existent widgets (many thanks to Bruce Perence, the libefence developer)
src/autoreplace_gui.cpp
--- a/src/autoreplace_gui.cpp	Fri Mar 30 17:44:51 2007 +0000
+++ b/src/autoreplace_gui.cpp	Fri Mar 30 21:58:38 2007 +0000
@@ -261,14 +261,14 @@
 
 				/* set wagon/engine button */
 				SetDParam(2, WP(w, replaceveh_d).wagon_btnstate ? STR_ENGINES : STR_WAGONS);
+
+				/* sets the colour of that art thing */
+				w->widget[13].color = _player_colors[_local_player];
+				w->widget[16].color = _player_colors[_local_player];
 			}
 
-			w->widget[13].color = _player_colors[_local_player]; // sets the colour of that art thing
-			w->widget[16].color = _player_colors[_local_player]; // sets the colour of that art thing
-
 			DrawWindowWidgets(w);
 
-
 			if (w->window_number == VEH_TRAIN) {
 				/* Draw the selected railtype in the pulldown menu */
 				RailType railtype = _railtype_selected_in_replace_gui;