fix panic 5435 (#5436)

This commit is contained in:
Konstantin Lebedev
2024-03-29 04:17:59 +05:00
committed by GitHub
parent 6aa804b368
commit df40908e57
4 changed files with 10 additions and 2 deletions

View File

@@ -28,6 +28,9 @@ func (dnll *VolumeLocationList) Copy() *VolumeLocationList {
func (dnll *VolumeLocationList) Head() *DataNode {
//mark first node as master volume
if dnll.Length() == 0 {
return nil
}
return dnll.list[0]
}