From 45051d7a9ff83005c54e5586ef7c99e7fe319f85 Mon Sep 17 00:00:00 2001 From: anthony Date: Thu, 23 Feb 2012 13:26:23 -0800 Subject: [PATCH] bug 13832: fixed NPE status 13832: resolved fixed --- .../src/com/cloud/storage/snapshot/SnapshotManagerImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java index ce4c6702b2e..b97a7d77ca1 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -699,11 +699,9 @@ public class SnapshotManagerImpl implements SnapshotManager, SnapshotService, Ma @DB public void postCreateSnapshot(Long volumeId, Long snapshotId, Long policyId, boolean backedUp) { Long userId = getSnapshotUserId(); - SnapshotVO snapshot = _snapshotDao.findByIdIncludingRemoved(snapshotId); - // Even if the current snapshot failed, we should schedule the next - // recurring snapshot for this policy. + SnapshotVO snapshot = _snapshotDao.findById(snapshotId); - if (snapshot.isRecursive()) { + if (snapshot != null && snapshot.isRecursive()) { postCreateRecurringSnapshotForPolicy(userId, volumeId, snapshotId, policyId); } }