VOL-435
NPE in oltApp when portstatus changes
Change-Id: I80d9ca1c554bc53c2f5b9a1c83fd25803a2c744e
diff --git a/app/src/main/java/org/opencord/olt/impl/Olt.java b/app/src/main/java/org/opencord/olt/impl/Olt.java
index b9fa73b..a875245 100644
--- a/app/src/main/java/org/opencord/olt/impl/Olt.java
+++ b/app/src/main/java/org/opencord/olt/impl/Olt.java
@@ -578,9 +578,11 @@
AccessDeviceData olt = oltData.get(devId);
VlanId vlan = subscribers.get(new ConnectPoint(devId,
event.port().number()));
- unprovisionSubscriber(devId, olt.uplink(),
- event.port().number(),
- vlan, olt.vlan(), olt.defaultVlan());
+ if (vlan != null) {
+ unprovisionSubscriber(devId, olt.uplink(),
+ event.port().number(),
+ vlan, olt.vlan(), olt.defaultVlan());
+ }
if (!oltData.get(devId).uplink().equals(event.port().number()) &&
event.port().isEnabled()) {
processFilteringObjectives(devId, event.port().number(), false);