summaryrefslogtreecommitdiff
path: root/src/game/g_combat.c
diff options
context:
space:
mode:
authorTremulous Test Server <tremtest@d1stkfactory>2015-01-29 22:09:01 +0000
committerTremulous Test Server <tremtest@d1stkfactory>2015-01-29 22:09:01 +0000
commit48998ab22fc2b36a7c4a44ce697aa4315ea0be92 (patch)
tree6390b5a992c31c322c70ce81f86fed67305414b0 /src/game/g_combat.c
parent7545415fe3ea29919e4dacfd4eedec7710924ff0 (diff)
Fixed null pointer accesses that caused the game to crash.
Diffstat (limited to 'src/game/g_combat.c')
-rw-r--r--src/game/g_combat.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index 9a7c1d3..b02ac3e 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -187,6 +187,7 @@ float G_CamperRewardBonus( gentity_t *self )
float G_TeamRewardScaleFactor( gentity_t *target )
{
if (level.humanRewardKills <= 0.0f || level.alienRewardKills <= 0.0f) return 1.0f;
+ if( !target->client ) return 1.0f;
if( target->client->ps.stats[ STAT_TEAM ] == TEAM_ALIENS) {
return level.alienRewardKills/level.humanRewardKills;
} else if( target->client->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) {