From 8a9a59c3ca49c24b19f3b3a8f88f367a24e9660b Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Tue, 23 Jun 2015 09:11:29 -0500 Subject: [PATCH] check if newDevice.EBS is nil --- builder/amazon/chroot/step_register_ami.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/amazon/chroot/step_register_ami.go b/builder/amazon/chroot/step_register_ami.go index 0074cfbbe..09df1e13d 100644 --- a/builder/amazon/chroot/step_register_ami.go +++ b/builder/amazon/chroot/step_register_ami.go @@ -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 }