X Tutup
Skip to content

Commit 6d750d0

Browse files
Fixing panic when d.deviceConfig is nil
Signed-off-by: Dave Henderson <Dave.Henderson@ca.ibm.com>
1 parent e4b6ff1 commit 6d750d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/softlayer/driver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ func (d *Driver) GetIP() (string, error) {
301301
if d.IPAddress != "" {
302302
return d.IPAddress, nil
303303
}
304-
if d.deviceConfig.PrivateNet {
304+
if d.deviceConfig != nil && d.deviceConfig.PrivateNet == true {
305305
return d.getClient().VirtualGuest().GetPrivateIp(d.Id)
306306
} else {
307307
return d.getClient().VirtualGuest().GetPublicIp(d.Id)

0 commit comments

Comments
 (0)
X Tutup