core: Fix crash with tainted resource

This commit fixes a crash in `terraform show` where there is no primary
resource, but there is a tainted resource, because of the changes made
to tainted resource handling in 0.7.
This commit is contained in:
James Nugent 2016-06-13 09:25:21 +02:00
parent ff2a7b0262
commit 75ab4a9970
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ func formatStateModuleExpand(
}
taintStr := ""
if rs.Primary.Tainted {
if rs.Primary != nil && rs.Primary.Tainted {
taintStr = " (tainted)"
}