[Common] Added checking if error is not equal to null. 63/74563/1
authorTomasz Marciniak <t.marciniak@samsung.com>
Tue, 14 Jun 2016 13:31:16 +0000 (15:31 +0200)
committerTomasz Marciniak <t.marciniak@samsung.com>
Tue, 14 Jun 2016 13:31:16 +0000 (15:31 +0200)
[Verification] Code compiles.

Change-Id: I4f21b360f851a58108a96a3e5c805af4715f6e4c
Signed-off-by: Tomasz Marciniak <t.marciniak@samsung.com>
src/common/filesystem/filesystem_provider_deviced.cc

index 4f17cc66675b859a174a4693a74aa478ceb71eaf..cf6a7ad5b5a5b3ab332569b7dcc8d43879819f13 100644 (file)
@@ -249,7 +249,8 @@ Storages FilesystemProviderDeviced::GetStorages() {
                                                   NULL,
                                                   &error);
   if (!variant || error) {
-    LoggerE("Failed to call GetDeviceList method - %s", error->message);
+    std::string message = error ? error->message : "";
+    LoggerE("Failed to call GetDeviceList method - %s", message.c_str());
     return Storages();
   }
   return GetStoragesFromGVariant(variant);