summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIronClawTrem <louie.nutman@gmail.com>2020-06-02 18:55:14 +0100
committerIronClawTrem <louie.nutman@gmail.com>2020-06-02 18:55:14 +0100
commit47c85dce3bd686c1c27065b36d0a1b68e6d77b1e (patch)
tree80cab7807cda2c57b330b7ca51fb93dce43641d0 /src
parentd47d4eb7b71a77d456079511dbc2db4e91e289da (diff)
fix segfault running !namelog through console
console has no guid :P
Diffstat (limited to 'src')
-rw-r--r--src/game/g_admin.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c
index e22639a..c446764 100644
--- a/src/game/g_admin.c
+++ b/src/game/g_admin.c
@@ -6554,14 +6554,12 @@ qboolean G_admin_namelog( gentity_t *ent, int skiparg )
for( j = 0; j < 8; j++ )
{
- if( G_admin_permission_guid( g_admin_namelog[ i ]->guid, ADMF_INCOGNITO )
+ if( ent && G_admin_permission_guid( g_admin_namelog[ i ]->guid, ADMF_INCOGNITO )
&& !admin_higher_guid( ent->client->pers.guid, g_admin_namelog[ i ]->guid )
&& !G_admin_permission( ent, ADMF_SEESINCOGNITO ) )
- {
guid_stub[ j ] = 'X';
- } else {
+ else
guid_stub[ j ] = g_admin_namelog[ i ]->guid[ j + 24 ];
- }
}
guid_stub[ j ] = '\0';