Changeset - r635:73de6529b960
[Not reviewed]
master
0 1 0
truelight - 19 years ago 2004-12-13 18:53:59
truelight@openttd.org
(svn r1066) -Fix: Crash when saving game as spectator (tnx to GeniusDex for reporting)
1 file changed with 8 insertions and 1 deletions:
0 comments (0 inline, 0 general)
misc_gui.c
Show inline comments
 
@@ -1014,7 +1014,14 @@ static void MakeSortedSaveGameList()
 

	
 
static void GenerateFileName(void)
 
{
 
	const Player *p = DEREF_PLAYER(_local_player);
 
	const Player *p;
 
	/* Check if we are not a specatator who wants to generate a name..
 
	    Let's use the name of player #0 for now. */
 
	if (_local_player < MAX_PLAYERS)
 
		p = DEREF_PLAYER(_local_player);
 
	else
 
		p = DEREF_PLAYER(0);
 

	
 
	SetDParam(0, p->name_1);
 
	SetDParam(1, p->name_2);
 
	SetDParam(2, _date);
0 comments (0 inline, 0 general)