- Fixed: PacketGet() can receive WSAECONNRESET after startup is complete, so it needs to check

for a NULL before using NetMessage.

SVN r2325 (trunk)
This commit is contained in:
Randy Heit 2010-05-14 03:37:44 +00:00
parent 5a71dea746
commit 1c8397e86d

View file

@ -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;