You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2015/01/18 12:51:14 UTC

git commit: updated refs/heads/4.3 to dc97372

Repository: cloudstack
Updated Branches:
  refs/heads/4.3 fc5d8e95b -> dc97372d6


engine/storage: add NPE check, break if parent snapshot is null

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
(cherry picked from commit c06ca09b54b053b37db9d4fc47226558bf15c6ba)
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/dc97372d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/dc97372d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/dc97372d

Branch: refs/heads/4.3
Commit: dc97372d6f97a41fccd4546072387c2daaa4227d
Parents: fc5d8e9
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Sun Jan 18 17:20:09 2015 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Sun Jan 18 17:21:07 2015 +0530

----------------------------------------------------------------------
 .../apache/cloudstack/storage/helper/VMSnapshotHelperImpl.java    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dc97372d/engine/storage/src/org/apache/cloudstack/storage/helper/VMSnapshotHelperImpl.java
----------------------------------------------------------------------
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 9693e91..b1c78dc 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();