From 257363a0670c97153cac88810144b427f6ecde1b Mon Sep 17 00:00:00 2001 From: sje Date: Mon, 29 Jan 2007 04:23:17 +0000 Subject: fix crash on exit by cleaning up iaxlib in 'pre shutdown' event git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@85 4f64403b-2f21-0410-a795-97e2b3489a10 --- iax/dllmain.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'iax/dllmain.cpp') diff --git a/iax/dllmain.cpp b/iax/dllmain.cpp index fdeee19..86866c3 100644 --- a/iax/dllmain.cpp +++ b/iax/dllmain.cpp @@ -70,7 +70,12 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) { return 0; } -HANDLE hModulesLoaded; +int PreShutdown(WPARAM wParam, LPARAM lParam) { + DeinitIAXInterface(); + return 0; +} + +HANDLE hModulesLoaded, hPreShutdown; extern "C" __declspec (dllexport) int __cdecl Load(PLUGINLINK *link) { pluginLink=link; @@ -114,6 +119,7 @@ extern "C" __declspec (dllexport) int __cdecl Load(PLUGINLINK *link) { // hook modules loaded hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded); + hPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown); return 0; } @@ -122,6 +128,5 @@ extern "C" __declspec (dllexport) int __cdecl Unload(void) { DeinitServices(); DeinitMenu(); DeinitIcons(); - DeinitIAXInterface(); return 0; } -- cgit v1.2.3