From 57567becc8776048f0765459c26d55a5aaf6a287 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 16 Apr 2014 11:02:08 -0700 Subject: [PATCH] fix unexpected null parameter to disconnect, closes, #2663 --- libraries/networking/src/NodeList.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/networking/src/NodeList.cpp b/libraries/networking/src/NodeList.cpp index 006d5e0509..fbf2655269 100644 --- a/libraries/networking/src/NodeList.cpp +++ b/libraries/networking/src/NodeList.cpp @@ -209,8 +209,10 @@ void NodeList::reset() { // clear the domain connection information _domainHandler.clearConnectionInfo(); - // also disconnect from the DTLS socket readyRead() so it can handle handshaking - disconnect(_dtlsSocket, 0, this, 0); + // if we setup the DTLS socket, also disconnect from the DTLS socket readyRead() so it can handle handshaking + if (_dtlsSocket) { + disconnect(_dtlsSocket, 0, this, 0); + } } void NodeList::addNodeTypeToInterestSet(NodeType_t nodeTypeToAdd) {