From ada728867fd2691f80c6d5dc5a8ee3785bf25df1 Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Sun, 13 Jul 2014 19:13:26 +0200 Subject: never pass a NULL ent to G_UseTargets() --- src/game/g_client.c | 2 +- src/game/g_utils.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/game/g_client.c b/src/game/g_client.c index 61ff80a3..5156b3e1 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -1468,7 +1468,7 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles else { // fire the targets of the spawn point - if( !spawn ) + if( !spawn && spawnPoint ) G_UseTargets( spawnPoint, ent ); client->ps.weapon = client->ps.stats[ STAT_WEAPON ]; diff --git a/src/game/g_utils.c b/src/game/g_utils.c index c11df5ba..8bce5a41 100644 --- a/src/game/g_utils.c +++ b/src/game/g_utils.c @@ -241,9 +241,6 @@ void G_UseTargets( gentity_t *ent, gentity_t *activator ) { gentity_t *t; - if( !ent ) - return; - if( ent->targetShaderName && ent->targetShaderNewName ) { float f = level.time * 0.001; -- cgit