Magnesium platform upgrade
[lispflowmapping.git] / mappingservice / shell / src / main / java / org / opendaylight / lispflowmapping / shell / LispAddKey.java
index f47739a55ded9134d166bc70b8da18d12d4b4bf0..31aefc41bda9236bbb142708f15805e89d9f8bd0 100644 (file)
@@ -24,8 +24,10 @@ public class LispAddKey  extends OsgiCommandSupport {
 
     @Override
     protected Object doExecute() throws Exception {
-        mappingServiceShell.addDefaultKeyIPv4();
-        mappingServiceShell.addDefaultKeyIPv6();
+        if (mappingServiceShell != null) {
+            mappingServiceShell.addDefaultKeyIPv4();
+            mappingServiceShell.addDefaultKeyIPv6();
+        }
         return null;
     }