(svn r6727) -Fix r6619: don't disable inexistant widget

This commit is contained in:
glx 2006-10-10 17:19:21 +00:00
parent 8d5033ee25
commit 5b0183ce70
1 changed files with 4 additions and 1 deletions

View File

@ -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);