- fix NPE
authorBart Polot <bart@net.in.tum.de>
Thu, 14 Nov 2013 10:31:02 +0000 (10:31 +0000)
committerBart Polot <bart@net.in.tum.de>
Thu, 14 Nov 2013 10:31:02 +0000 (10:31 +0000)
src/mesh/gnunet-service-mesh_channel.c

index c334932d70e3650be165809e8517257fb917ea36..de2c465b797fae110d853a7525d921556acaf587 100644 (file)
@@ -1292,7 +1292,7 @@ GMCH_allow_client (struct MeshChannel *ch, int fwd)
       GNUNET_break (0);
       return;
     }
-    if (64 <= rel->mid_send - rel->head_sent->mid)
+    if (NULL != rel->head_sent && 64 <= rel->mid_send - rel->head_sent->mid)
     {
       LOG (GNUNET_ERROR_TYPE_DEBUG,
            " too big mid gap! Wait for ACK.\n");