From a46baf1a0315e63a3e08b2272622831194cf7b11 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sun, 30 Aug 2015 07:11:11 +0000 Subject: Toaster: code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@15111 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Toaster/src/toast_event_handler.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugins/Toaster/src/toast_event_handler.cpp') diff --git a/plugins/Toaster/src/toast_event_handler.cpp b/plugins/Toaster/src/toast_event_handler.cpp index 47ceb8d561..51689bab3e 100644 --- a/plugins/Toaster/src/toast_event_handler.cpp +++ b/plugins/Toaster/src/toast_event_handler.cpp @@ -52,12 +52,16 @@ IFACEMETHODIMP ToastEventHandler::Invoke(_In_ IToastNotification* /* sender */, if (_callback != nullptr) _callback(_arg); + callbackArg *cb = (callbackArg*)_arg; + mir_cslock lck(csNotifications); + lstNotifications.remove(cb->notification); return S_OK; } IFACEMETHODIMP ToastEventHandler::Invoke(_In_ IToastNotification* /* sender */, _In_ IToastDismissedEventArgs* /* e */) { callbackArg *cb = (callbackArg*)_arg; + mir_cslock lck(csNotifications); lstNotifications.remove(cb->notification); return S_OK; } @@ -65,6 +69,7 @@ IFACEMETHODIMP ToastEventHandler::Invoke(_In_ IToastNotification* /* sender */, IFACEMETHODIMP ToastEventHandler::Invoke(_In_ IToastNotification* /* sender */, _In_ IToastFailedEventArgs* /* e */) { callbackArg *cb = (callbackArg*)_arg; + mir_cslock lck(csNotifications); lstNotifications.remove(cb->notification); return S_OK; } \ No newline at end of file -- cgit v1.2.3