From 5b0183ce70eeed0fd2f90aa30acaeddc97a3c6b8 Mon Sep 17 00:00:00 2001 From: glx Date: Tue, 10 Oct 2006 17:19:21 +0000 Subject: [PATCH] (svn r6727) -Fix r6619: don't disable inexistant widget --- player_gui.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/player_gui.c b/player_gui.c index d59dcecfaf..6fb3fd7ff1 100644 --- a/player_gui.c +++ b/player_gui.c @@ -155,7 +155,10 @@ static void PlayerFinancesWndProc(Window *w, WindowEvent *e) 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);