Committed by
Gerrit Code Review
Fixed an NPE in DeviceManager provider service.
Change-Id: I9afc5e715ee88855384652dc81677b3de5b89300
Showing
1 changed file
with
4 additions
and
2 deletions
... | @@ -417,8 +417,10 @@ public class DeviceManager | ... | @@ -417,8 +417,10 @@ public class DeviceManager |
417 | .collect(Collectors.toList()); | 417 | .collect(Collectors.toList()); |
418 | List<DeviceEvent> events = store.updatePorts(this.provider().id(), | 418 | List<DeviceEvent> events = store.updatePorts(this.provider().id(), |
419 | deviceId, portDescriptions); | 419 | deviceId, portDescriptions); |
420 | - for (DeviceEvent event : events) { | 420 | + if (events != null) { |
421 | - post(event); | 421 | + for (DeviceEvent event : events) { |
422 | + post(event); | ||
423 | + } | ||
422 | } | 424 | } |
423 | } | 425 | } |
424 | 426 | ... | ... |
-
Please register or login to post a comment