diff options
author | George Hazan <george.hazan@gmail.com> | 2013-07-14 08:11:47 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-07-14 08:11:47 +0000 |
commit | 1108b934840c416832af0367b9247e63041fe869 (patch) | |
tree | b8fd2a3969b8b91483d2f9c145c1530500feca5b | |
parent | e31b1ea994cb4c4f78fb10497f84db7bc47ce196 (diff) |
we remove events only when shutdown is irreversible
git-svn-id: http://svn.miranda-ng.org/main/trunk@5356 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/AVS/src/main.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index 3f03247a9a..7a54b884ef 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -2105,21 +2105,17 @@ static int OptInit(WPARAM wParam, LPARAM lParam) static int OkToExitProc(WPARAM wParam, LPARAM lParam)
{
- EnterCriticalSection(&cachecs);
g_shutDown = TRUE;
-
- DestroyHookableEvent(hEventChanged); hEventChanged = 0;
- DestroyHookableEvent(hEventContactAvatarChanged); hEventContactAvatarChanged = 0;
- DestroyHookableEvent(hMyAvatarChanged); hMyAvatarChanged = 0;
-
- LeaveCriticalSection(&cachecs);
-
SetEvent(hLoaderEvent);
return 0;
}
static int ShutdownProc(WPARAM wParam, LPARAM lParam)
{
+ DestroyHookableEvent(hEventChanged); hEventChanged = 0;
+ DestroyHookableEvent(hEventContactAvatarChanged); hEventContactAvatarChanged = 0;
+ DestroyHookableEvent(hMyAvatarChanged); hMyAvatarChanged = 0;
+
DeleteCriticalSection(&cachecs);
DeleteCriticalSection(&alloccs);
return 0;
|