changeset 4805:e7d602200399 draft

(svn r6727) -Fix r6619: don't disable inexistant widget
author glx <glx@openttd.org>
date Tue, 10 Oct 2006 17:19:21 +0000
parents 131ec5d3140c
children 04002cb8932c
files player_gui.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/player_gui.c
+++ b/player_gui.c
@@ -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);