Skip to content

Commit

Permalink
Merge pull request #45 from pluralsh/fix-nil-pointer-deref
Browse files Browse the repository at this point in the history
Fix nil pointer dereference in tf provider
  • Loading branch information
michaeljguarino authored Jul 6, 2024
2 parents 54d51db + a5e7be6 commit 96d9c18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/resource/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (r *clusterResource) Delete(ctx context.Context, req resource.DeleteRequest

if err = wait.PollWithContext(ctx, 10*time.Second, 10*time.Minute, func(ctx context.Context) (bool, error) {
response, err := r.client.GetCluster(ctx, data.Id.ValueStringPointer())
if client.IsNotFound(err) || response.Cluster == nil {
if client.IsNotFound(err) || response == nil || response.Cluster == nil {
return true, nil
}

Expand Down

0 comments on commit 96d9c18

Please sign in to comment.