You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2014/09/05 14:38:26 UTC

git commit: updated refs/heads/hotfix/4.4-CID1237195 to 61892bb

Repository: cloudstack
Updated Branches:
  refs/heads/hotfix/4.4-CID1237195 [created] 61892bb28


CID 1237195: null deref when no project found

Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/61892bb2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/61892bb2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/61892bb2

Branch: refs/heads/hotfix/4.4-CID1237195
Commit: 61892bb28ac81503eab638e8297b5ad9e1a1d8e1
Parents: 6957587
Author: Daan Hoogland <da...@onecht.net>
Authored: Fri Sep 5 14:37:37 2014 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Fri Sep 5 14:37:37 2014 +0200

----------------------------------------------------------------------
 .../org/apache/cloudstack/network/lb/CertServiceImpl.java   | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/61892bb2/server/src/org/apache/cloudstack/network/lb/CertServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/network/lb/CertServiceImpl.java b/server/src/org/apache/cloudstack/network/lb/CertServiceImpl.java
index b5e4a17..695b935 100644
--- a/server/src/org/apache/cloudstack/network/lb/CertServiceImpl.java
+++ b/server/src/org/apache/cloudstack/network/lb/CertServiceImpl.java
@@ -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());
         }