]> jfr.im git - irc/quakenet/newserv.git/commitdiff
patrol_commands: Fix crash.
authorGunnar Beutner <redacted>
Wed, 18 Sep 2013 04:17:46 +0000 (06:17 +0200)
committerGunnar Beutner <redacted>
Wed, 18 Sep 2013 04:17:46 +0000 (06:17 +0200)
patrol/patrol_commands.c

index 4bbf5e75735f77cb22725f83841175a09885594f..008c86b42d3d1a65ef214c1e2e8b0927373cabbd 100644 (file)
@@ -81,7 +81,9 @@ static int pc_part(char *name) {
 
     if (ircd_strcmp(pc->channel->content, name) == 0) {
       freesstring(pc->channel);
-      deregisterlocaluser(pc->nick, NULL);
+
+      if (pc->nick)
+        deregisterlocaluser(pc->nick, NULL);
 
       *pnext = pc->next;
       free(pc);