Thomas Vachuska

Fixed potential NPE in port-stats.

Change-Id: Id3cc83b0ca914223f2cf267605c29cc2093c313f
...@@ -215,7 +215,7 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr ...@@ -215,7 +215,7 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr
215 215
216 for (OFPortStatsEntry entry : entries) { 216 for (OFPortStatsEntry entry : entries) {
217 try { 217 try {
218 - if (entry.getPortNo() == null || entry.getPortNo().getPortNumber() < 0) { 218 + if (entry == null || entry.getPortNo() == null || entry.getPortNo().getPortNumber() < 0) {
219 continue; 219 continue;
220 } 220 }
221 DefaultPortStatistics.Builder builder = DefaultPortStatistics.builder(); 221 DefaultPortStatistics.Builder builder = DefaultPortStatistics.builder();
......