Check for no snapshot and no error

This commit is contained in:
Ian Wahbe 2021-08-25 11:55:28 -07:00
parent 738af2b90f
commit 6ac7798ea1

View file

@ -332,6 +332,8 @@ func getCurrentStackAbout(b backend.Backend) (currentStackAbout, error) {
snapshot, err = stack.Snapshot(context)
if err != nil {
return currentStackAbout{}, err
} else if snapshot == nil {
return currentStackAbout{}, errors.New("No current snapshot")
}
var resources []*resource.State = snapshot.Resources
var pendingOps []resource.Operation = snapshot.PendingOperations