aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--weed/topology/topology_event_handling.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/topology/topology_event_handling.go b/weed/topology/topology_event_handling.go
index e2dcfca06..44ab33114 100644
--- a/weed/topology/topology_event_handling.go
+++ b/weed/topology/topology_event_handling.go
@@ -56,5 +56,7 @@ func (t *Topology) UnRegisterDataNode(dn *DataNode) {
dn.UpAdjustVolumeCountDelta(-dn.GetVolumeCount())
dn.UpAdjustActiveVolumeCountDelta(-dn.GetActiveVolumeCount())
dn.UpAdjustMaxVolumeCountDelta(-dn.GetMaxVolumeCount())
- dn.Parent().UnlinkChildNode(dn.Id())
+ if dn.Parent() != nil {
+ dn.Parent().UnlinkChildNode(dn.Id())
+ }
}