(svn r7366) -Fix: Out of bounds widget access when accessing orders window of other players.
authorDarkvater
Tue, 05 Dec 2006 09:19:14 +0000
changeset 5242 db331cfced9a
parent 5241 2dafe1235308
child 5243 a564347a939b
(svn r7366) -Fix: Out of bounds widget access when accessing orders window of other players.
order_gui.c
--- a/order_gui.c	Mon Dec 04 20:27:53 2006 +0000
+++ b/order_gui.c	Tue Dec 05 09:19:14 2006 +0000
@@ -86,12 +86,12 @@
 		/* Disable list of vehicles with the same shared orders if there is no list */
 		SetWindowWidgetDisabledState(w, 11, !shared_orders || v->orders == NULL);
 		SetWindowWidgetDisabledState(w, 12, order == NULL); // Refit
+		HideWindowWidget(w, 12); // Refit
 	} else {
 		DisableWindowWidget(w, 10);
 	}
 
 	ShowWindowWidget(w, 9); // Unload
-	HideWindowWidget(w, 12); // Refit
 
 	if (order != NULL) {
 		switch (order->type) {