forked from TrueCloudLab/frostfs-api-go
[#115] netmap: Fix type getters
* Add type instance check for nil to avoid panic by accessing fields. Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
9c0007fb1d
commit
0484647aae
1 changed files with 4 additions and 0 deletions
|
@ -335,6 +335,10 @@ func (p *PlacementPolicy) SetContainerBackupFactor(backupFactor uint32) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PlacementPolicy) GetReplicas() []Replica {
|
func (p *PlacementPolicy) GetReplicas() []Replica {
|
||||||
|
if p == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
return p.replicas
|
return p.replicas
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue