Skip to content

Commit

Permalink
Merge pull request #8834 from hashicorp/b-diff-suppress-empty
Browse files Browse the repository at this point in the history
core: Check for attrV being nil before dereference
  • Loading branch information
jen20 authored Sep 14, 2016
2 parents 6a84704 + e0226c9 commit 7eea9f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion helper/schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,9 @@ func (m schemaMap) diff(
}

for attrK, attrV := range unsupressedDiff.Attributes {
if schema.DiffSuppressFunc != nil && schema.DiffSuppressFunc(attrK, attrV.Old, attrV.New, d) {
if schema.DiffSuppressFunc != nil &&
attrV != nil &&
schema.DiffSuppressFunc(attrK, attrV.Old, attrV.New, d) {
continue
}

Expand Down

0 comments on commit 7eea9f2

Please sign in to comment.