]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Fix crash in newsearch gline.
authorGunnar Beutner <redacted>
Thu, 18 Jul 2013 14:57:03 +0000 (16:57 +0200)
committerGunnar Beutner <redacted>
Thu, 18 Jul 2013 14:57:03 +0000 (16:57 +0200)
newsearch/ns-gline.c

index 30b11337ba545a63226f98d7a67ce790a0c5f818..55dbcab4961a3e8b07a001e9f9d644abc57d1343 100644 (file)
@@ -134,7 +134,8 @@ void *gline_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput) {
   if (ctx->searchcmd == reg_chansearch) {
     cip = (chanindex *)theinput;
     cip->marker = localdata->marker;
-    localdata->count += cip->channel->users->totalusers;
+    if (cip->channel != NULL)
+      localdata->count += cip->channel->users->totalusers;
   }
   else {
     np = (nick *)theinput;