Skip to content

Commit fff763e

Browse files
Vijayendra BhamidipatiSheng Yang
authored andcommitted
CLOUDSTACK-3514: [Automation] Vmware - Failed to download default template for first zone
Description: Fixing reference to null object.
1 parent 43ebb1c commit fff763e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,9 @@ protected long recalculateAccountResourceCount(long accountId, ResourceType type
812812
_resourceCountDao.lockRows(sc, null, true);
813813

814814
ResourceCountVO accountRC = _resourceCountDao.findByOwnerAndType(accountId, ResourceOwnerType.Account, type);
815-
long oldCount = accountRC.getCount();
815+
long oldCount = 0;
816+
if (accountRC != null)
817+
oldCount = accountRC.getCount();
816818

817819
if (type == Resource.ResourceType.user_vm) {
818820
newCount = _userVmDao.countAllocatedVMsForAccount(accountId);

0 commit comments

Comments
 (0)