diff --git a/engine/storage/src/org/apache/cloudstack/storage/helper/VMSnapshotHelperImpl.java b/engine/storage/src/org/apache/cloudstack/storage/helper/VMSnapshotHelperImpl.java index 9693e914cd4..b1c78dce202 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/helper/VMSnapshotHelperImpl.java +++ b/engine/storage/src/org/apache/cloudstack/storage/helper/VMSnapshotHelperImpl.java @@ -138,6 +138,9 @@ public class VMSnapshotHelperImpl implements VMSnapshotHelper { VMSnapshotVO current = snapshot; while (current.getParent() != null) { VMSnapshotVO parent = snapshotMap.get(current.getParent()); + if (parent == null) { + break; + } currentTO.setParent(convert2VMSnapshotTO(parent)); current = snapshotMap.get(current.getParent()); currentTO = currentTO.getParent();