[#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
8f268ad512
commit
5e82e8c776
1 changed files with 4 additions and 0 deletions
|
@ -335,6 +335,10 @@ func (p *PlacementPolicy) SetContainerBackupFactor(backupFactor uint32) {
|
|||
}
|
||||
|
||||
func (p *PlacementPolicy) GetReplicas() []Replica {
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return p.replicas
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue