Merge pull request #5748 from hashicorp/b-5402

provider/digitalocean: Check for nil response
This commit is contained in:
James Nugent 2016-03-21 14:30:55 +00:00
commit 07297f10d6
2 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@ BUG FIXES:
* core: Modules sourced from a Mercurial repository now work correctly on Windows [GH-5739]
* provider/aws: Fix crash when an `aws_rds_cluster_instance` is removed outside of Terraform [GH-5717]
* provider/aws: `aws_lambda_function` resources no longer error on refresh if deleted externally to Terraform [GH-5668]
* provider/aws: `aws_vpn_connection` resources deleted via the console on longer cause a crash [GH-5747]
* provider/google: Default description `google_dns_managed_zone` resources to "Managed By Terraform" [GH-5428]
* provider/google: Fix error message on invalid instance URL for `google_compute_instance_group` [GH-5715]
* provider/vsphere: provide `host` to provisioner connections [GH-5558]

View File

@ -74,7 +74,7 @@ func resourceDigitalOceanSSHKeyRead(d *schema.ResourceData, meta interface{}) er
if err != nil {
// If the key is somehow already destroyed, mark as
// successfully gone
if resp.StatusCode == 404 {
if resp != nil && resp.StatusCode == 404 {
d.SetId("")
return nil
}