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:25 UTC

git commit: updated refs/heads/4.4 to ea3fb82

Repository: cloudstack
Updated Branches:
  refs/heads/4.4 a52bbfb2c -> ea3fb82f8


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/ea3fb82f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ea3fb82f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ea3fb82f

Branch: refs/heads/4.4
Commit: ea3fb82f8fd03ace6997a2ee9b7ec92e57646e30
Parents: a52bbfb
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:18 2015 +0530

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ea3fb82f/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 e0fc90c..a1bcd45 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();