bug 13832: fixed NPE

status 13832: resolved fixed
This commit is contained in:
anthony 2012-02-23 13:26:23 -08:00 committed by Salvatore Orlando
parent 8b1daa5466
commit 45051d7a9f
1 changed files with 2 additions and 4 deletions

View File

@ -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);
}
}