From 1c8397e86d23c0c15933a1d588b6a03fefea7053 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 14 May 2010 03:37:44 +0000 Subject: [PATCH] - Fixed: PacketGet() can receive WSAECONNRESET after startup is complete, so it needs to check for a NULL before using NetMessage. SVN r2325 (trunk) --- src/i_net.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/i_net.cpp b/src/i_net.cpp index 633c75d1a..ae28bb779 100644 --- a/src/i_net.cpp +++ b/src/i_net.cpp @@ -269,8 +269,16 @@ void PacketGet (void) if (err == WSAECONNRESET) { // The remote node aborted unexpectedly, so pretend it sent an exit packet - StartScreen->NetMessage ("The connection from %s was dropped.\n", - players[sendplayer[node]].userinfo.netname); + if (StartScreen != NULL) + { + StartScreen->NetMessage ("The connection from %s was dropped.\n", + players[sendplayer[node]].userinfo.netname); + } + else + { + Printf("The connection from %s was dropped.\n", + players[sendplayer[node]].userinfo.netname); + } doomcom.data[0] = 0x80; // NCMD_EXIT c = 1;