LRN: fast and dirty transport crash fix
authorChristian Grothoff <christian@grothoff.org>
Fri, 2 Sep 2011 07:57:14 +0000 (07:57 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 2 Sep 2011 07:57:14 +0000 (07:57 +0000)
src/transport/gnunet-service-transport.c

index 67dc4e96221078ec77fd4a87f6dd330150559ec4..5bf3c4c772072fa98495c07046c812565feebf5e 100644 (file)
@@ -1613,6 +1613,12 @@ transmit_send_continuation (void *cls, const struct GNUNET_PeerIdentity *target,
       mq->specific_address->in_transmit = GNUNET_NO;
   }
   n = find_neighbour (&mq->neighbour_id);
+  if (n == NULL)
+  {
+    GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, "transmit_send_continuation",
+                     "Neighbour `%s' no longer exists\n", GNUNET_i2s (&mq->neighbour_id));
+    return;
+  }
   if (mq->client != NULL)
     transmit_send_ok (mq->client, n, target, result);
   GNUNET_assert (n != NULL);