Fix wrong object creation 59/212459/3
authorJusung Son <jusung07.son@samsung.com>
Wed, 21 Aug 2019 23:49:56 +0000 (08:49 +0900)
committerMyungKi Lee <mk5004.lee@samsung.com>
Tue, 17 Sep 2019 05:47:20 +0000 (05:47 +0000)
- In the case of DeleteAll, nullptr is transmitted to the deletedItem

Change-Id: I0f193eb27cc3f1ec8fef706d20b3eff0b00e7972
Signed-off-by: Jusung Son <jusung07.son@samsung.com>
notification-ex/stub.cc

index 79dc2a8..34007ef 100644 (file)
@@ -148,10 +148,16 @@ class ManagerCallbackInfo {
     if (cb_.deleted == nullptr)
       return;
     IEventInfo* c_info = const_cast<IEventInfo*>(&info);
-    cb_.deleted(static_cast<noti_ex_manager_h>(manager),
+    if(c_info->GetEventType() == static_cast<int>(IEventInfo::EventType::DeleteAll)) {
+      cb_.deleted(static_cast<noti_ex_manager_h>(manager),
+        static_cast<noti_ex_event_info_h>(c_info),
+        nullptr, user_data_);
+    } else {
+      cb_.deleted(static_cast<noti_ex_manager_h>(manager),
         static_cast<noti_ex_event_info_h>(c_info),
         static_cast<noti_ex_item_h>(
             new Handle(deletedItem)), user_data_);
+    }
   }
 
   void InvokeError(Manager* manager, NotificationError error, int requestId) {