cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject git commit: updated refs/heads/master to 165618a
Date Thu, 24 Jul 2014 23:59:16 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master e15c20ec0 -> 165618ac9


CLOUDSTACK-7166: fix NPE


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

Branch: refs/heads/master
Commit: 165618ac9ac2937fbb1d7ff0da89de1abba4ccc1
Parents: e15c20e
Author: Edison Su <sudison@gmail.com>
Authored: Thu Jul 24 16:58:30 2014 -0700
Committer: Edison Su <sudison@gmail.com>
Committed: Thu Jul 24 16:58:30 2014 -0700

----------------------------------------------------------------------
 server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/165618ac/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
index a8b7e5f..76ab370 100755
--- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
+++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
@@ -623,7 +623,9 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager,
                 if (snapshotStrategy.deleteSnapshot(snapshot.getId())) {
                     if (Type.MANUAL == snapshot.getRecurringType()) {
                         _resourceLimitMgr.decrementResourceCount(accountId, ResourceType.snapshot);
-                        _resourceLimitMgr.decrementResourceCount(accountId, ResourceType.secondary_storage,
new Long(snapshotStoreRef.getSize()));
+                        if  (snapshotStoreRef != null) {
+                            _resourceLimitMgr.decrementResourceCount(accountId, ResourceType.secondary_storage,
new Long(snapshotStoreRef.getSize()));
+                        }
                     }
 
                     // Log event after successful deletion


Mime
View raw message