bugfix: GetLeafNidsForMon check node is nil

This commit is contained in:
Ulric Qin 2020-10-08 19:39:52 +08:00
parent 700370f70f
commit 3534aa7e69
1 changed files with 4 additions and 0 deletions

View File

@ -576,6 +576,10 @@ func GetLeafNidsForMon(nid int64, exclNid []int64) ([]int64, error) {
return nids, err return nids, err
} }
if node == nil {
return []int64{}, nil
}
nodeIds, err := node.LeafIds() nodeIds, err := node.LeafIds()
if err != nil { if err != nil {
return nids, err return nids, err