mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
(svn r7008) -Fix [FS#369]: Crash at game end when server company is bankrupt
This commit is contained in:
parent
ae5eac42de
commit
8b12e25468
@ -967,11 +967,14 @@ static void EndGameWndProc(Window *w, WindowEvent *e)
|
|||||||
{
|
{
|
||||||
switch (e->event) {
|
switch (e->event) {
|
||||||
case WE_PAINT: {
|
case WE_PAINT: {
|
||||||
const Player *p = GetPlayer(_local_player);
|
const Player *p;
|
||||||
uint x, y;
|
uint x, y;
|
||||||
|
|
||||||
SetupHighScoreEndWindow(w, &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
|
/* 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 */
|
* 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/
|
if (WP(w, highscore_d).background_img == SPR_TYCOON_IMG2_BEGIN) { // Tycoon of the century \o/
|
||||||
|
Loading…
Reference in New Issue
Block a user