we do not want to crash if somebody leaves the net
authorPhilipp Tölke <toelke@in.tum.de>
Wed, 21 Sep 2011 07:44:10 +0000 (07:44 +0000)
committerPhilipp Tölke <toelke@in.tum.de>
Wed, 21 Sep 2011 07:44:10 +0000 (07:44 +0000)
src/mesh/mesh_api.c

index 8476be3969d106f3a2d6ffee92a30fafce1bd1de..4b6731d3fa6467f4b5a4c3a07ec82b5a82bafa92 100644 (file)
@@ -336,7 +336,8 @@ core_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
                                    tail);
       GNUNET_free (tail);
     }
-    GNUNET_CORE_notify_transmit_ready_cancel (element->hello);
+    if (element->hello != NULL)
+      GNUNET_CORE_notify_transmit_ready_cancel (element->hello);
     GNUNET_SCHEDULER_cancel (element->sched);
     GNUNET_free (element);
   }