Repository: cloudstack Updated Branches: refs/heads/4.4 0b9982226 -> 840938504
CLOUDSTACK-6672: [Automation] NPE observed while listing system vms fixing NPE Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/84093850 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/84093850 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/84093850 Branch: refs/heads/4.4 Commit: 840938504b9ed5931785070c70234d36b5ed577e Parents: 0b99822 Author: Murali Reddy <muralimmre...@gmail.com> Authored: Mon May 19 10:30:21 2014 +0530 Committer: Daan Hoogland <d...@onecht.net> Committed: Mon May 19 11:04:57 2014 +0200 ---------------------------------------------------------------------- server/src/com/cloud/api/ApiResponseHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/84093850/server/src/com/cloud/api/ApiResponseHelper.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java index ce685c6..6746c13 100755 --- a/server/src/com/cloud/api/ApiResponseHelper.java +++ b/server/src/com/cloud/api/ApiResponseHelper.java @@ -1209,8 +1209,8 @@ public class ApiResponseHelper implements ResponseGenerator { NetworkOffering networkOffering = ApiDBUtils.findNetworkOfferingById(network.getNetworkOfferingId()); if (networkOffering.getElasticIp()) { IpAddress ip = ApiDBUtils.findIpByAssociatedVmId(vm.getId()); - Vlan vlan = ApiDBUtils.findVlanById(ip.getVlanId()); if (ip != null) { + Vlan vlan = ApiDBUtils.findVlanById(ip.getVlanId()); vmResponse.setPublicIp(ip.getAddress().addr()); vmResponse.setPublicNetmask(vlan.getVlanNetmask()); vmResponse.setGateway(vlan.getVlanGateway());