]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_main.c
fix a crash in SV_ConnectClient on bots
[xonotic/darkplaces.git] / 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);
-       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