diff --git a/src/cluster.cpp b/src/cluster.cpp index 6d6f2be2e..1ebaed262 100644 --- a/src/cluster.cpp +++ b/src/cluster.cpp @@ -2235,6 +2235,8 @@ void clusterWriteHandler(connection *conn) { void clusterLinkConnectHandler(connection *conn) { clusterLink *link = (clusterLink*)connGetPrivateData(conn); clusterNode *node = link->node; + if (node == nullptr) + return; // we're about to be freed /* Check if connection succeeded */ if (connGetState(conn) != CONN_STATE_CONNECTED) {