Skip to content

Commit

Permalink
Merge pull request skynetservices#195 from jbaikge/skyfix
Browse files Browse the repository at this point in the history
Prevent runtime panic with topology
  • Loading branch information
erikstmartin committed May 28, 2013
2 parents 6d8b22c + dc041d9 commit 7247d79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/sky/sky.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ func PrintTopology(q *skynet.Query) {

// Build topology hash first
for _, instance := range results {
// Prevent runtime nil pointer dereference
if instance.Config == nil {
continue
}
if topology[instance.Config.Region] == nil {
topology[instance.Config.Region] = make(map[string]map[string]map[string][]*skynet.ServiceInfo)
}
Expand Down

0 comments on commit 7247d79

Please sign in to comment.