Skip to content

Commit

Permalink
Fix nil dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
hamstah committed Jun 11, 2018
1 parent 6ba0464 commit 4c6c811
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.4
5.4.1
2 changes: 1 addition & 1 deletion ec2/ip-from-name/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func main() {
for _, reservation := range resp.Reservations {
if len(reservation.Instances) > 0 {
instance := reservation.Instances[0]
if instance != nil {
if instance != nil && instance.PrivateIpAddress != nil {
ips = append(ips, *instance.PrivateIpAddress)
}
}
Expand Down

0 comments on commit 4c6c811

Please sign in to comment.