Skip to content

Commit

Permalink
azure: tag map can return nil
Browse files Browse the repository at this point in the history
Fixes #3193
  • Loading branch information
magiconair committed Jul 15, 2017
1 parent ef4bfe5 commit 8c8529a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion agent/config_azure.go
Expand Up @@ -41,7 +41,8 @@ func (c *Config) discoverAzureHosts(logger *log.Logger) ([]string, error) {
for _, oneint := range *netres.Value {
// Make it a little more robust just in case there is actually no Tags
if oneint.Tags != nil {
if *(*oneint.Tags)[c.RetryJoinAzure.TagName] == c.RetryJoinAzure.TagValue {
tv := (*oneint.Tags)[c.RetryJoinAzure.TagName]
if tv != nil && *tv == c.RetryJoinAzure.TagValue {
// Make it a little more robust just in case IPConfigurations nil
if oneint.IPConfigurations != nil {
for _, onecfg := range *oneint.IPConfigurations {
Expand Down

0 comments on commit 8c8529a

Please sign in to comment.