You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by hu...@apache.org on 2014/09/19 11:56:07 UTC

[2/2] git commit: updated refs/heads/master to 90df7cf

CID-1116300 Prevent potential NPE


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

Branch: refs/heads/master
Commit: 90df7cf88144b4fa05bdf4d0719bdaac8e564e4a
Parents: 6f54d48
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Fri Sep 19 11:55:17 2014 +0200
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Fri Sep 19 11:55:17 2014 +0200

----------------------------------------------------------------------
 core/src/com/cloud/resource/ServerResourceBase.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/90df7cf8/core/src/com/cloud/resource/ServerResourceBase.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/resource/ServerResourceBase.java b/core/src/com/cloud/resource/ServerResourceBase.java
index a24ea98..69ddb29 100755
--- a/core/src/com/cloud/resource/ServerResourceBase.java
+++ b/core/src/com/cloud/resource/ServerResourceBase.java
@@ -122,6 +122,10 @@ public abstract class ServerResourceBase implements ServerResource {
             }
         }
         String infos[] = NetUtils.getNetworkParams(_privateNic);
+        if (infos == null) {
+            s_logger.warn("Incorrect details for private Nic during initialization of ServerResourceBase");
+            return false;
+        }
         params.put("host.ip", infos[0]);
         params.put("host.mac.address", infos[1]);