nanohub HAL: test: handle missing file name

Change-Id: Ie5095d098f4a85c008e5e5e1d5cc99681fc9356c
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
diff --git a/contexthubhal/test/main.cpp b/contexthubhal/test/main.cpp
index abd2a05..9ea2d0a 100644
--- a/contexthubhal/test/main.cpp
+++ b/contexthubhal/test/main.cpp
@@ -239,7 +239,8 @@
         if (appFileName)
             req = (load_app_request_t *)loadFile(appFileName, &fileSize);
         if (!req || fileSize < sizeof(*req) || req->app_binary.magic != NANOAPP_MAGIC) {
-            std::clog << "Invalid nanoapp image: " << appFileName << std::endl;
+            std::clog << "Invalid nanoapp image: " <<
+                         (appFileName != nullptr ? appFileName : "<NULL>") << std::endl;
             return 1;
         }
         cli.sendMessageToSystem(CONTEXT_HUB_LOAD_APP, req, fileSize);