mirror of https://github.com/apache/cloudstack.git
engine/storage: add NPE check, break if parent snapshot is null
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit c06ca09b54)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
fc5d8e95bf
commit
dc97372d6f
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue