Fix NPE in PacketManager

This happens when a device event comes in when there
is no device service available.

Change-Id: I50ea44da433979ef0a3a238b22d295e671849ff4
This commit is contained in:
Ray Milkey 2017-11-30 13:52:54 -08:00
parent 83300ca763
commit fa89f2a641

View File

@ -452,6 +452,10 @@ public class PacketManager
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) {