summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2017-04-13 11:30:00 +0000
committer/dev/humancontroller <devhc@example.com>2017-04-15 17:24:17 +0200
commit0b88388204f4a1854ac7ae8486bb403023125827 (patch)
treecfcd1e8aa81e0e2f00c962166a9eba71c06e786e /src
parent3688def7ff8188b910695950b6bb538ccc2d6d07 (diff)
fix a null dereference bug
Diffstat (limited to 'src')
-rw-r--r--src/game/g_cmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 163636f..db39491 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -1055,7 +1055,7 @@ void G_Say( gentity_t *ent, gentity_t *target, int mode, const char *chatText )
return;
// Invisible players cannot use chat
- if( ent->client->sess.invisible == qtrue )
+ if( ent && ent->client->sess.invisible == qtrue )
{
if( !G_admin_cmd_check( ent, qtrue ) )
trap_SendServerCommand( ent-g_entities, "print \"You cannot chat while invisible\n\"" );