Check ptr, not addr

This commit is contained in:
Atlante45 2015-07-15 15:30:54 -07:00
parent 8483b168be
commit 725383e43a

View file

@ -496,7 +496,7 @@ unsigned int LimitedNodeList::broadcastToNodes(std::unique_ptr<NLPacket> packet,
unsigned int n = 0;
eachNode([&](const SharedNodePointer& node){
if (!node->getActiveSocket()->isNull() && destinationNodeTypes.contains(node->getType())) {
if (node->getActiveSocket() && destinationNodeTypes.contains(node->getType())) {
writePacket(*packet, *node->getActiveSocket(), node->getConnectionSecret());
++n;
}