Skip to content

Commit

Permalink
core: Check for attrV being nil before dereference
Browse files Browse the repository at this point in the history
This can be an issue with unset computed fields.

Fixes #8815.
  • Loading branch information
jen20 committed Sep 14, 2016
1 parent a0a59d3 commit c10a9f7
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 c10a9f7

Please sign in to comment.