# HG changeset patch # User Darkvater # Date 1162259141 0 # Node ID 4aac6506e2aefbfbb1160c63ed968b4c76428403 # Parent fbda573524de0e998706a13bc5aa9b9ec3e0b28d (svn r7008) -Fix [FS#369]: Crash at game end when server company is bankrupt diff -r fbda573524de -r 4aac6506e2ae player_gui.c --- a/player_gui.c Sun Oct 29 18:54:05 2006 +0000 +++ b/player_gui.c Tue Oct 31 01:45:41 2006 +0000 @@ -967,11 +967,14 @@ { switch (e->event) { case WE_PAINT: { - const Player *p = GetPlayer(_local_player); + const Player *p; uint x, y; SetupHighScoreEndWindow(w, &x, &y); + if (!IsValidPlayer(_local_player)) break; + + p = GetPlayer(_local_player); /* We need to get performance from last year because the image is shown * at the start of the new year when these things have already been copied */ if (WP(w, highscore_d).background_img == SPR_TYCOON_IMG2_BEGIN) { // Tycoon of the century \o/