From eca970bb0cc68036045aa0ef3401b309b92ff7c3 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Sun, 12 Jul 2015 00:45:48 +0000 Subject: [PATCH] Added check of function parameter to DistantChatService::handleRecvDHPublicKey. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8589 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/chat/distantchat.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libretroshare/src/chat/distantchat.cc b/libretroshare/src/chat/distantchat.cc index 7db1fb5d6..310edc454 100644 --- a/libretroshare/src/chat/distantchat.cc +++ b/libretroshare/src/chat/distantchat.cc @@ -509,6 +509,11 @@ bool DistantChatService::handleEncryptedData(const uint8_t *data_bytes,uint32_t void DistantChatService::handleRecvDHPublicKey(RsChatDHPublicKeyItem *item) { + if (!item) + { + return; + } + #ifdef DEBUG_DISTANT_CHAT std::cerr << "DistantChatService: Received DH public key." << std::endl; item->print(std::cerr, 0) ;