osp crash is fixed when the remove sms listner.
authorByounghui <byounghui.lim@samsung.com>
Tue, 17 Sep 2013 06:20:02 +0000 (15:20 +0900)
committerByounghui <byounghui.lim@samsung.com>
Tue, 17 Sep 2013 06:20:02 +0000 (15:20 +0900)
Change-Id: Id4ef4f0572af892f97a2fa0df73a072d26b9d496
Signed-off-by: Byounghui <byounghui.lim@samsung.com>
src/FMsg_SmsManagerImpl.cpp

index cf2b771..dda6f69 100644 (file)
@@ -216,6 +216,7 @@ _SmsManagerImpl::AddSmsEventListener(int port, ISmsEventListener& eventListener)
 CATCH:
        if (pSmsTriggerEvent)
        {
+               __pSmsTriggerEventList->Remove(*pSmsTriggerEvent);
                delete pSmsTriggerEvent;
        }
 
@@ -254,6 +255,7 @@ _SmsManagerImpl::RemoveSmsEventListener(int port, ISmsEventListener& eventListen
 
        // remove corresponding event from the list
        r = __pSmsTriggerEventList->RemoveAt(index, true);
+       
        SysTryReturn(NID_MSG, r == E_SUCCESS, r, r, "Failed to remove the event listener");
 
        return r;