mirror of https://github.com/apache/cloudstack.git
null deref when no project found
This commit is contained in:
parent
0ec36e128b
commit
b145a7d140
|
|
@ -302,8 +302,13 @@ public class CertServiceImpl implements CertService {
|
|||
if (account.getType() == Account.ACCOUNT_TYPE_PROJECT) {
|
||||
// find the project
|
||||
Project project = _projectMgr.findByProjectAccountIdIncludingRemoved(account.getId());
|
||||
response.setProjectId(project.getUuid());
|
||||
response.setProjectName(project.getName());
|
||||
if (project != null)
|
||||
{
|
||||
response.setProjectId(project.getUuid());
|
||||
response.setProjectName(project.getName());
|
||||
} else {
|
||||
response.setAccountName(account.getAccountName());
|
||||
}
|
||||
} else {
|
||||
response.setAccountName(account.getAccountName());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue