mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
[MOD] fix a bug.if node is nil will get an panic.
This commit is contained in:
parent
c67aee7012
commit
7a7f4cecbb
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue