(svn r6727) -Fix r6619: don't disable inexistant widget
authorglx
Tue, 10 Oct 2006 17:19:21 +0000
changeset 4805 51a7aedb94a8
parent 4804 bfa7a5b5ad15
child 4806 2e9d9fc049b0
(svn r6727) -Fix r6619: don't disable inexistant widget
player_gui.c
--- a/player_gui.c	Tue Oct 10 15:46:03 2006 +0000
+++ b/player_gui.c	Tue Oct 10 17:19:21 2006 +0000
@@ -155,7 +155,10 @@
 		PlayerID player = w->window_number;
 		const Player *p = GetPlayer(player);
 
-		SetWindowWidgetDisabledState(w, 7, p->current_loan == 0);
+		if (player == _local_player) {
+			/* borrow/repay buttons only exist for local player */
+			SetWindowWidgetDisabledState(w, 7, p->current_loan == 0);
+		}
 
 		SetDParam(0, p->name_1);
 		SetDParam(1, p->name_2);