Navigation Menu

Skip to content

Commit

Permalink
2.1: Don't crash if we fail to open the netlog file. Problem reported…
Browse files Browse the repository at this point in the history
… by some guy.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.1@7004 4a71c877-e1ca-e34f-864e-861f7616d084
  • Loading branch information
perim committed Apr 10, 2009
1 parent 69d7d88 commit 1a4b30b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/netplay/netlog.c
Expand Up @@ -184,9 +184,9 @@ BOOL NETlogEntry(const char *str,UDWORD a,UDWORD b)
time( &aclock ); /* Get time in seconds */
newtime = localtime( &aclock ); /* Convert time to struct */

if (!newtime || a >= NET_GAME_FLAGS || !str)
if (!newtime || a >= NET_GAME_FLAGS || !str || !pFileHandle)
{
debug(LOG_ERROR, "Fatal error averted");
debug(LOG_ERROR, "Fatal error averted in NETlog");
return false;
}

Expand Down

0 comments on commit 1a4b30b

Please sign in to comment.