add assertion to make static analysis happy
authorChristian Grothoff <christian@grothoff.org>
Fri, 10 Mar 2017 17:19:44 +0000 (18:19 +0100)
committerChristian Grothoff <christian@grothoff.org>
Fri, 10 Mar 2017 17:19:44 +0000 (18:19 +0100)
src/cadet/gnunet-service-cadet-new_channel.c

index bce62032aedd73a4fedeae4d91b2db9a14dda575..43c9058167911d1a5669cd42f67853f065d23a28 100644 (file)
@@ -1917,15 +1917,17 @@ GCCH_handle_local_ack (struct CadetChannel *ch,
     GSC_send_to_client (ccc->c,
                         com->env);
     /* Notify sender that we can receive more */
-    if (ccc->ccn.channel_of_client ==
-        ch->owner->ccn.channel_of_client)
+    if ( (NULL != ch->owner) &&
+         (ccc->ccn.channel_of_client ==
+          ch->owner->ccn.channel_of_client) )
     {
       to_owner = GNUNET_NO;
     }
     else
     {
-      GNUNET_assert (ccc->ccn.channel_of_client ==
-                     ch->dest->ccn.channel_of_client);
+      GNUNET_assert ( (NULL != ch->dest) &&
+                      (ccc->ccn.channel_of_client ==
+                       ch->dest->ccn.channel_of_client) );
       to_owner = GNUNET_YES;
     }
     send_ack_to_client (ch,