- Don't crash, _break instead
authorBart Polot <bart@net.in.tum.de>
Tue, 24 Dec 2013 14:26:56 +0000 (14:26 +0000)
committerBart Polot <bart@net.in.tum.de>
Tue, 24 Dec 2013 14:26:56 +0000 (14:26 +0000)
src/mesh/gnunet-service-mesh_connection.c

index 3d4f18678df18627ca9ef93227bce1ca50e23127..3b526afebe8fe5fb6e8e266b37a5ff27b6fb02b2 100644 (file)
@@ -2696,6 +2696,11 @@ GMC_is_sendable (struct MeshConnection *c, int fwd)
 {
   struct MeshFlowControl *fc;
 
+  if (NULL == c)
+  {
+    GNUNET_break (0);
+    return GNUNET_YES;
+  }
   fc = fwd ? &c->fwd_fc : &c->bck_fc;
   if (GM_is_pid_bigger (fc->last_ack_recv, fc->last_pid_sent))
     return GNUNET_YES;