diff --git a/include/s_newconf.h b/include/s_newconf.h index 0e135f2e..d3f9b1f5 100644 --- a/include/s_newconf.h +++ b/include/s_newconf.h @@ -167,7 +167,7 @@ extern void cluster_generic(struct Client *, const char *, int cltype, #define IsOperConfEncrypted(x) ((x)->flags & OPER_ENCRYPTED) -#define HasPrivilege(x, y) (privilegeset_in_set((x)->localClient->privset, (y))) +#define HasPrivilege(x, y) ((x)->localClient != NULL && (x)->localClient->privset != NULL && privilegeset_in_set((x)->localClient->privset, (y))) #define IsOperGlobalKill(x) (HasPrivilege((x), "oper:global_kill")) #define IsOperLocalKill(x) (HasPrivilege((x), "oper:local_kill"))