Fixed NPE.

This commit is contained in:
alena 2011-10-28 17:23:11 -07:00
parent 80dc2c0b1a
commit 346a6fe80a
1 changed files with 4 additions and 2 deletions

View File

@ -2383,8 +2383,10 @@ public class ApiResponseHelper implements ResponseGenerator {
sgr.setDescription(sgd.getDescription());
Account account = ApiDBUtils.findAccountByNameDomain(sgd.getAccountName(), sgd.getDomainId());
populateAccount(sgr, account.getId());
populateDomain(sgr, sgd.getDomainId());
if (account != null) {
populateAccount(sgr, account.getId());
populateDomain(sgr, account.getDomainId());
}
sgr.setObjectName(sgd.getObjectName());
securityGroupResponse.add(sgr);