diff options
author | /dev/humancontroller <devhc@example.com> | 2014-07-13 19:13:26 +0200 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-03-09 13:51:12 +0100 |
commit | ada728867fd2691f80c6d5dc5a8ee3785bf25df1 (patch) | |
tree | 52b779caa016ab0b96d183370224dc08bf8c6c3e | |
parent | f8dd3e4323d44c717c34e64d26128cc9ed4d6c98 (diff) |
never pass a NULL ent to G_UseTargets()
-rw-r--r-- | src/game/g_client.c | 2 | ||||
-rw-r--r-- | src/game/g_utils.c | 3 |
2 files changed, 1 insertions, 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; |