Skip to content

Commit e18ca01

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 13c1c62 commit e18ca01

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
@@ -811,7 +811,9 @@ protected long recalculateAccountResourceCount(long accountId, ResourceType type
811811
_resourceCountDao.lockRows(sc, null, true);
812812

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

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

0 commit comments

Comments
 (0)