To not to GetSharedPath if there is no image item in chat-message item 57/228157/1
authormk5004.lee <mk5004.lee@samsung.com>
Thu, 19 Mar 2020 08:33:05 +0000 (17:33 +0900)
committermk5004.lee <mk5004.lee@samsung.com>
Thu, 19 Mar 2020 08:36:22 +0000 (17:36 +0900)
Change-Id: Icd6d0d180707546db984e18edff13477ceedd971
Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
notification-ex/chat_message_item.cc

index 6bc1934..c5ceb87 100644 (file)
@@ -162,9 +162,11 @@ bool ChatMessageItem::IsItemTypeExist(int type) {
 std::list<std::string> ChatMessageItem::GetSharedPath() const {
   std::list<std::string> ret;
 
-  auto image = impl_->image_->GetSharedPath();
-  for (auto& i : image) {
-    ret.push_back(std::move(i));
+  if (impl_->image_ != nullptr) {
+    auto image = impl_->image_->GetSharedPath();
+    for (auto& i : image) {
+      ret.push_back(std::move(i));
+    }
   }
 
   return ret;