[ONOS-8115] Fix for NPE while adding annotations for device using netcfg

Change-Id: Ia30499b969a984e8580474a810a306f96b56879a
diff --git a/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java b/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
index b114d0c..e40b14d 100644
--- a/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
+++ b/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
@@ -1144,7 +1144,9 @@
                 DeviceDescription desc =
                         (dev == null) ? null : BasicDeviceOperator.descriptionOf(dev);
                 Optional<Config> prevConfig = event.prevConfig();
-                desc = deviceAnnotationOp.combine(did, desc, prevConfig);
+                if (desc != null) { // Fix for NPE due to desc being null
+                    desc = deviceAnnotationOp.combine(did, desc, prevConfig);
+                }
                 if (desc != null && dp != null) {
                     store.createOrUpdateDevice(dp.id(), did, desc);
                 }