Fix for NPE that can get triggered upon onos instance restart.

Change-Id: I9ea9d8d92d43dc0543be0b336ba9bcc856b9bcbc
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
index f1a63fc..3aed5cc 100644
--- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
+++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
@@ -263,6 +263,9 @@
             // new ECMPspg calculation as it is not a topology event. As a
             // result, we use the current/existing ECMPspg in the updated map
             // used by the redoRouting method.
+            if (updatedEcmpSpgMap == null) {
+                updatedEcmpSpgMap = new HashMap<>();
+            }
             currentEcmpSpgMap.entrySet().forEach(entry -> {
                 updatedEcmpSpgMap.put(entry.getKey(), entry.getValue());
                 if (log.isDebugEnabled()) {