From cde66fb4feee7c87c3bd0a230ca2bc7b5af6d901 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 02677213a8c..0a9de2944f0 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -703,11 +703,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); } }