From c5cb557cb434f1c08c1bad4380a98ea66a47b2ae Mon Sep 17 00:00:00 2001 From: Tomasz Marciniak Date: Tue, 14 Jun 2016 15:31:16 +0200 Subject: [PATCH] [Common] Added checking if error is not equal to null. [Verification] Code compiles. Change-Id: I4f21b360f851a58108a96a3e5c805af4715f6e4c Signed-off-by: Tomasz Marciniak --- src/common/filesystem/filesystem_provider_deviced.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/filesystem/filesystem_provider_deviced.cc b/src/common/filesystem/filesystem_provider_deviced.cc index 4f17cc66..cf6a7ad5 100644 --- a/src/common/filesystem/filesystem_provider_deviced.cc +++ b/src/common/filesystem/filesystem_provider_deviced.cc @@ -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); -- 2.34.1