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

[21/50] [abbrv] git commit: updated refs/heads/ldapplugin to 7bc705e

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/fff763ef
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fff763ef
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fff763ef

Branch: refs/heads/ldapplugin
Commit: fff763ef81be0478d48bf826434fc15ae9df1032
Parents: 43ebb1c
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:51 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/fff763ef/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 9ec27bd..5a9d360 100755
--- a/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
+++ b/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
@@ -812,7 +812,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);