]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
don't crash when .clientcamera is set on a botclient
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 22 Oct 2011 00:01:07 +0000 (00:01 +0000)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 23 Oct 2011 12:13:15 +0000 (14:13 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11457 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=7397cf446562edf35f00217a2ed5fbac9be38c72

sv_main.c

index d1a737157e90a061aa60f7de0d534f9f4d08d39e..7a2abb9b9a40a5c1781826afa6f6e51f50e26725 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -2484,7 +2484,7 @@ static void SV_UpdateToReliableMessages (void)
                                clientcamera = PRVM_NUM_FOR_EDICT(host_client->edict);
                        host_client->clientcamera = clientcamera;
 
-                       if (oldclientcamera != host_client->clientcamera)
+                       if (oldclientcamera != host_client->clientcamera && host_client->netconnection)
                        {
                                MSG_WriteByte(&host_client->netconnection->message, svc_setview);
                                MSG_WriteShort(&host_client->netconnection->message, host_client->clientcamera);