Null pointer exception while reading the published attributes from IOF13Switch object
diff --git a/src/main/java/net/onrc/onos/core/drivermanager/OFSwitchImplSpringOpenTTP.java b/src/main/java/net/onrc/onos/core/drivermanager/OFSwitchImplSpringOpenTTP.java
index 1b0d9ef..6b453b8 100644
--- a/src/main/java/net/onrc/onos/core/drivermanager/OFSwitchImplSpringOpenTTP.java
+++ b/src/main/java/net/onrc/onos/core/drivermanager/OFSwitchImplSpringOpenTTP.java
@@ -189,6 +189,7 @@
         isEdgeRouter = false;
         groupid = new AtomicInteger(0);
         this.usePipeline13 = usePipeline13;
+        publishAttributes = null;
     }
 
     // *****************************
diff --git a/src/main/java/net/onrc/onos/core/topology/TopologyPublisher.java b/src/main/java/net/onrc/onos/core/topology/TopologyPublisher.java
index 3ed55e9..53fb165 100644
--- a/src/main/java/net/onrc/onos/core/topology/TopologyPublisher.java
+++ b/src/main/java/net/onrc/onos/core/topology/TopologyPublisher.java
@@ -393,7 +393,8 @@
             for (Entry<String, String> e : attr.entrySet()) {
                 switchData.createStringAttribute(e.getKey(), e.getValue());
             }
-            if (sw instanceof IOF13Switch) {
+            if ((sw instanceof IOF13Switch) &&
+                    (((IOF13Switch) sw).getPublishAttributes() != null)) {
                 Map<String, String> pa = ((IOF13Switch) sw).getPublishAttributes();
                 for (Entry<String, String> e : pa.entrySet()) {
                     switchData.createStringAttribute(e.getKey(), e.getValue());