summaryrefslogtreecommitdiff
path: root/plugins/AVS/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/AVS/src/main.cpp')
-rw-r--r--plugins/AVS/src/main.cpp12
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;