Check for nil change during apply

Because NodeAbstractResourceInstance.readDiff can return a nil change,
we must check for that in all callers.
This commit is contained in:
James Bardin 2021-10-06 12:51:03 -04:00
parent 3c942ee3ac
commit 3f4b680f1c
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ func (n *NodeDestroyResourceInstance) managedResourceExecute(ctx EvalContext) (d
changeApply, err = n.readDiff(ctx, providerSchema)
diags = diags.Append(err)
if diags.HasErrors() {
if changeApply == nil || diags.HasErrors() {
return diags
}