Backport bugfix for NPE to onos-1.5

(from commit 04b1fe9adab1382e89a743174b40505f900cd6b9)

Change-Id: Ie2af821e232bc8a1c9d6828c464bf3e54ad8cd11
This commit is contained in:
Charles Chan 2016-06-16 20:43:19 -07:00 committed by Gerrit Code Review
parent d25d6963da
commit 0cf9e346d6

View File

@ -343,7 +343,11 @@ public class DistributedDhcpStore implements DhcpStore {
@Override
public IpAssignment getIpAssignmentFromAllocationMap(HostId hostId) {
return allocationMap.get(hostId).value();
if (allocationMap.get(hostId) != null) {
return allocationMap.get(hostId).value();
} else {
return null;
}
}
/**