Fix wrong return value 88/217488/3
authorhyunho <hhstark.kang@samsung.com>
Tue, 12 Nov 2019 05:42:43 +0000 (14:42 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Thu, 28 Nov 2019 10:23:44 +0000 (10:23 +0000)
Style is nullable attribute.
The other nullable attributes return error_none for null value.

Change-Id: Iadc20370ba0ad286348976bbedd902bbf2091515
Signed-off-by: hyunho <hhstark.kang@samsung.com>
notification-ex/stub.cc

index 3cf1b29..1c700b9 100644 (file)
@@ -2034,9 +2034,10 @@ extern "C" EXPORT_API int noti_ex_item_get_style(noti_ex_item_h handle,
 
   Handle* p = static_cast<Handle*>(handle);
   shared_ptr<Style> s = p->Get()->GetStyle();
-  if (s.get() == nullptr) {
-    LOGE("Style is null");
-    return NOTI_EX_ERROR_INVALID_PARAMETER;
+  if (s == nullptr || s.get() == nullptr) {
+    LOGW("Style is null");
+    *style = nullptr;
+    return NOTI_EX_ERROR_NONE;
   }
 
   auto* ptr = new (std::nothrow) shared_ptr<Style>(new (std::nothrow) Style(*s));