commit | 7951b23a7cb97217bef7677b4379a6d8edd5c39f | [log] [tgz] |
---|---|---|
author | tom <tom@onlab.us> | Mon Oct 06 13:35:30 2014 -0700 |
committer | tom <tom@onlab.us> | Mon Oct 06 13:35:30 2014 -0700 |
tree | a4eb121ee52c408d6aba0e751bd2d3137ddc5287 | |
parent | a0ed763c88462978c70392429d03bfbebbb27bf3 [diff] |
Fixed NPE when removing flows.
diff --git a/core/net/src/main/java/org/onlab/onos/net/flow/impl/FlowRuleManager.java b/core/net/src/main/java/org/onlab/onos/net/flow/impl/FlowRuleManager.java index 27a86a3..ce11cea 100644 --- a/core/net/src/main/java/org/onlab/onos/net/flow/impl/FlowRuleManager.java +++ b/core/net/src/main/java/org/onlab/onos/net/flow/impl/FlowRuleManager.java
@@ -103,9 +103,11 @@ for (int i = 0; i < flowRules.length; i++) { f = flowRules[i]; device = deviceService.getDevice(f.deviceId()); - frp = getProvider(device.providerId()); store.deleteFlowRule(f); - frp.removeFlowRule(f); + if (device != null) { + frp = getProvider(device.providerId()); + frp.removeFlowRule(f); + } } }