check if newDevice.EBS is nil

pull/2289/head
Clint Shryock 11 years ago
parent 9f8b0041f0
commit 8a9a59c3ca

@ -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,
// otherwise AWS API will return InvalidParameter
if newDevice.EBS.Encrypted != nil {
if newDevice.EBS != nil && newDevice.EBS.Encrypted != nil {
newDevice.EBS.Encrypted = nil
}

Loading…
Cancel
Save