commit | fb29fb1372aa418a0fc5ca5210475069725670cd | [log] [tgz] |
---|---|---|
author | Ray Milkey <ray@opennetworking.org> | Thu Nov 30 13:52:54 2017 -0800 |
committer | Thomas Vachuska <tom@opennetworking.org> | Fri Dec 01 19:53:54 2017 +0000 |
tree | aea3ac95aacecfa405412f469942df72c6165f3e | |
parent | 1186815ac52225af99f59ef6663bf14554232b64 [diff] |
Fix NPE in PacketManager This happens when a device event comes in when there is no device service available. Change-Id: I50ea44da433979ef0a3a238b22d295e671849ff4
diff --git a/core/net/src/main/java/org/onosproject/net/packet/impl/PacketManager.java b/core/net/src/main/java/org/onosproject/net/packet/impl/PacketManager.java index 1ecf5b4..943bb93 100644 --- a/core/net/src/main/java/org/onosproject/net/packet/impl/PacketManager.java +++ b/core/net/src/main/java/org/onosproject/net/packet/impl/PacketManager.java
@@ -452,6 +452,10 @@ public void event(DeviceEvent event) { eventHandlingExecutor.execute(() -> { try { + if (driverService == null) { + // Event came in after the driver service shut down, nothing to be done + return; + } Device device = event.subject(); Driver driver = driverService.getDriver(device.id()); if (driver == null) {