tom

Fixed NPE when removing flows.

...@@ -103,9 +103,11 @@ public class FlowRuleManager ...@@ -103,9 +103,11 @@ public class FlowRuleManager
103 for (int i = 0; i < flowRules.length; i++) { 103 for (int i = 0; i < flowRules.length; i++) {
104 f = flowRules[i]; 104 f = flowRules[i];
105 device = deviceService.getDevice(f.deviceId()); 105 device = deviceService.getDevice(f.deviceId());
106 - frp = getProvider(device.providerId());
107 store.deleteFlowRule(f); 106 store.deleteFlowRule(f);
108 - frp.removeFlowRule(f); 107 + if (device != null) {
108 + frp = getProvider(device.providerId());
109 + frp.removeFlowRule(f);
110 + }
109 } 111 }
110 } 112 }
111 113
......