diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-01-06 10:29:33 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-01-06 10:29:33 +0000 |
commit | 0a8afde40e4061f7ec46b87aa9a0dbfdee1e7847 (patch) | |
tree | 81b7c6e19f33eff0064b0a33c66729f75dc83af7 /plugins/Toaster/src/services.cpp | |
parent | 5954ed7d4ccf489452b515717b3747327a498e2b (diff) |
Toaster: crash fix(?)
git-svn-id: http://svn.miranda-ng.org/main/trunk@16030 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Toaster/src/services.cpp')
-rw-r--r-- | plugins/Toaster/src/services.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Toaster/src/services.cpp b/plugins/Toaster/src/services.cpp index 7f25162755..269cc63da0 100644 --- a/plugins/Toaster/src/services.cpp +++ b/plugins/Toaster/src/services.cpp @@ -228,14 +228,16 @@ static INT_PTR ShowMessage(WPARAM wParam, LPARAM lParam) static INT_PTR HideToast(WPARAM, LPARAM lParam)
{
ToastNotification* pNotification = reinterpret_cast<ToastNotification*>(lParam);
+ mir_cslock lck(csNotifications);
if (lstNotifications.getIndex(pNotification) != -1)
- pNotification->Destroy();
+ lstNotifications.remove(pNotification);
return 0;
}
void __stdcall HideAllToasts(void*)
{
+ mir_cslock lck(csNotifications);
while (lstNotifications.getCount())
- lstNotifications[0].Destroy();
+ lstNotifications.remove(0);
}
void InitServices()
|