diff --git a/go/topology/node.go b/go/topology/node.go index 3b6d55ce9..f48f18236 100644 --- a/go/topology/node.go +++ b/go/topology/node.go @@ -211,8 +211,8 @@ func (n *NodeImpl) LinkChildNode(node Node) { func (n *NodeImpl) UnlinkChildNode(nodeId NodeId) { node := n.children[nodeId] - node.SetParent(nil) if node != nil { + node.SetParent(nil) delete(n.children, node.Id()) n.UpAdjustVolumeCountDelta(-node.GetVolumeCount()) n.UpAdjustActiveVolumeCountDelta(-node.GetActiveVolumeCount())