check if newDevice.EBS is nil

This commit is contained in:
Clint Shryock 2015-06-23 09:11:29 -05:00
parent 9f8b0041f0
commit 8a9a59c3ca
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ func (s *StepRegisterAMI) Run(state multistep.StateBag) multistep.StepAction {
// assume working from a snapshot, so we unset the Encrypted field if set, // assume working from a snapshot, so we unset the Encrypted field if set,
// otherwise AWS API will return InvalidParameter // otherwise AWS API will return InvalidParameter
if newDevice.EBS.Encrypted != nil { if newDevice.EBS != nil && newDevice.EBS.Encrypted != nil {
newDevice.EBS.Encrypted = nil newDevice.EBS.Encrypted = nil
} }