From: Christian Grothoff Date: Thu, 23 Jun 2016 20:01:41 +0000 (+0000) Subject: do not crash for #4588 X-Git-Tag: initial-import-from-subversion-38251~724 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fb80a8163d9ff402a4502e29712000d71543fe60;p=oweals%2Fgnunet.git do not crash for #4588 --- 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) )