Magnesium platform upgrade
[lispflowmapping.git] / mappingservice / shell / src / main / java / org / opendaylight / lispflowmapping / shell / LispKeys.java
index 2a684e981a5ac55539146563dcdd02c7851c459d..f4952ba8957aadb5508555e14c189a9594765e6c 100644 (file)
@@ -33,10 +33,12 @@ public class LispKeys  extends OsgiCommandSupport {
     @Override
     @SuppressWarnings("checkstyle:RegexpSinglelineJava")
     protected Object doExecute() throws Exception {
-        if (debug) {
-            System.out.print(mappingServiceShell.printKeys());
-        } else {
-            System.out.print(mappingServiceShell.prettyPrintKeys());
+        if (mappingServiceShell != null) {
+            if (debug) {
+                System.out.print(mappingServiceShell.printKeys());
+            } else {
+                System.out.print(mappingServiceShell.prettyPrintKeys());
+            }
         }
         return null;
     }