Make sure it can't be null
authorMario <mario@smbclan.net>
Sun, 3 Jan 2016 14:30:53 +0000 (00:30 +1000)
committerMario <mario@smbclan.net>
Sun, 3 Jan 2016 14:30:53 +0000 (00:30 +1000)
qcsrc/client/view.qc

index f1d0831..1999bfb 100644 (file)
@@ -1486,6 +1486,8 @@ void CSQC_UpdateView(float w, float h)
                        eventchase_running = true;
 
                        entity local_player = ((csqcplayer) ? csqcplayer : CSQCModel_server2csqc(player_localentnum - 1));
+                       if(!local_player)
+                               local_player = self; // fall back!
 
                        // make special vector since we can't use view_origin (It is one frame old as of this code, it gets set later with the results this code makes.)
                        vector current_view_origin = (csqcplayer ? csqcplayer.origin : pmove_org);