From fb80a8163d9ff402a4502e29712000d71543fe60 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 23 Jun 2016 20:01:41 +0000 Subject: do not crash for #4588 --- src/core/core_api.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/core_api.c b/src/core/core_api.c index 7699f8b74..451b871fb 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c @@ -963,6 +963,11 @@ GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle, struct SendMessageRequest *smr; struct GNUNET_MQ_Envelope *env; + if (NULL == handle->mq) + { + GNUNET_break (0); /* SEE #4588: do not call NTR from disconnect notification! */ + return NULL; + } GNUNET_assert (NULL != notify); if ( (notify_size > GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE) || (notify_size + sizeof (struct SendMessage) >= GNUNET_SERVER_MAX_MESSAGE_SIZE) ) -- cgit v1.2.3