]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix a crash if an invalid monster in the spawn list is spawned
authorMario <mario.mario@y7mail.com>
Sun, 2 Jun 2013 11:43:10 +0000 (21:43 +1000)
committerMario <mario.mario@y7mail.com>
Sun, 2 Jun 2013 11:43:10 +0000 (21:43 +1000)
qcsrc/server/target_spawn.qc

index ebb89aa5c9c0bf274742139a99d56f3ecf2eacb2..55029775454e3b4202539ee60b5e70d91aeb8985 100644 (file)
@@ -216,7 +216,8 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                        self = e;
                        activator = act;
 
-                       self.target_spawn_spawnfunc();
+                       if(self.target_spawn_spawnfunc)
+                               self.target_spawn_spawnfunc();
 
                        self = oldself;
                        activator = oldactivator;