]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix a crash in SV_ConnectClient on bots
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 11 Feb 2006 22:49:59 +0000 (22:49 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 11 Feb 2006 22:49:59 +0000 (22:49 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5963 d7cf8633-e32d-0410-b094-e92efae38249

sv_main.c

index 8e68234bdffa27eebfd714d601cfb4193530fade..b817cc97053d977746e799ccb20d95cd16715581 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -408,7 +408,8 @@ void SV_ConnectClient (int clientnum, netconn_t *netconnection)
        strcpy(client->old_name, "unconnected");
        client->spawned = false;
        client->edict = PRVM_EDICT_NUM(clientnum+1);
        strcpy(client->old_name, "unconnected");
        client->spawned = false;
        client->edict = PRVM_EDICT_NUM(clientnum+1);
-       client->netconnection->message.allowoverflow = true;            // we can catch it
+       if (client->netconnection)
+               client->netconnection->message.allowoverflow = true;            // we can catch it
        // updated by receiving "rate" command from client
        client->rate = NET_MINRATE;
        // no limits for local player
        // updated by receiving "rate" command from client
        client->rate = NET_MINRATE;
        // no limits for local player