mirror of https://github.com/docker/docs.git
Fixing panic when d.deviceConfig is nil
Signed-off-by: Dave Henderson <Dave.Henderson@ca.ibm.com>
This commit is contained in:
parent
e4b6ff1ae9
commit
6d750d04f1
|
@ -301,7 +301,7 @@ func (d *Driver) GetIP() (string, error) {
|
||||||
if d.IPAddress != "" {
|
if d.IPAddress != "" {
|
||||||
return d.IPAddress, nil
|
return d.IPAddress, nil
|
||||||
}
|
}
|
||||||
if d.deviceConfig.PrivateNet {
|
if d.deviceConfig != nil && d.deviceConfig.PrivateNet == true {
|
||||||
return d.getClient().VirtualGuest().GetPrivateIp(d.Id)
|
return d.getClient().VirtualGuest().GetPrivateIp(d.Id)
|
||||||
} else {
|
} else {
|
||||||
return d.getClient().VirtualGuest().GetPublicIp(d.Id)
|
return d.getClient().VirtualGuest().GetPublicIp(d.Id)
|
||||||
|
|
Loading…
Reference in New Issue