From 0b88388204f4a1854ac7ae8486bb403023125827 Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Thu, 13 Apr 2017 11:30:00 +0000 Subject: fix a null dereference bug --- src/game/g_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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\"" ); -- cgit