[ONOS-4687] GoldenEye - Label map download issues.

Change-Id: I5b56ccc6b8bad3c585f4d33ddd6d9094751c8797
diff --git a/protocols/pcep/ctl/src/main/java/org/onosproject/pcep/controller/impl/PcepClientControllerImpl.java b/protocols/pcep/ctl/src/main/java/org/onosproject/pcep/controller/impl/PcepClientControllerImpl.java
index cb40ea0..00a7a20 100644
--- a/protocols/pcep/ctl/src/main/java/org/onosproject/pcep/controller/impl/PcepClientControllerImpl.java
+++ b/protocols/pcep/ctl/src/main/java/org/onosproject/pcep/controller/impl/PcepClientControllerImpl.java
@@ -434,10 +434,16 @@
             }
 
             List<PcepStateReport> syncStateRptList = pc.getSyncMsgList(pccId);
+            if (syncStateRptList == null) {
+                // When there are no LSPs to sync, directly end-of-sync PCRpt will come and the
+                // list will be null.
+                syncStateRptList = Collections.EMPTY_LIST;
+            }
+
             Iterator<PcepStateReport> stateRptListIterator = syncStateRptList.iterator();
 
             // For every report, fetch PLSP id, local LSP id and symbolic path name from the message.
-            while (syncStateRptList.iterator().hasNext()) {
+            while (stateRptListIterator.hasNext()) {
                 PcepStateReport stateRpt = stateRptListIterator.next();
                 Tunnel tunnel = null;