You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ya...@apache.org on 2013/07/17 01:14:40 UTC

git commit: updated refs/heads/4.2 to e18ca01

Updated Branches:
  refs/heads/4.2 13c1c6291 -> e18ca0117


CLOUDSTACK-3514: [Automation] Vmware - Failed to download default template for first zone

Description:

    Fixing reference to null object.


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

Branch: refs/heads/4.2
Commit: e18ca0117d76cc6b095659e4e354ab977174b96c
Parents: 13c1c62
Author: Vijayendra Bhamidipati <vi...@citrix.com>
Authored: Mon Jul 15 11:54:34 2013 -0700
Committer: Sheng Yang <sh...@citrix.com>
Committed: Tue Jul 16 16:14:10 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e18ca011/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java b/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
index b5c060d..a721510 100755
--- a/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
+++ b/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
@@ -811,7 +811,9 @@ public class ResourceLimitManagerImpl extends ManagerBase implements ResourceLim
         _resourceCountDao.lockRows(sc, null, true);
 
         ResourceCountVO accountRC = _resourceCountDao.findByOwnerAndType(accountId, ResourceOwnerType.Account, type);
-        long oldCount = accountRC.getCount();
+        long oldCount = 0;
+        if (accountRC != null)
+            oldCount = accountRC.getCount();
 
         if (type == Resource.ResourceType.user_vm) {
             newCount = _userVmDao.countAllocatedVMsForAccount(accountId);