summaryrefslogtreecommitdiff
path: root/iax/dllmain.cpp
diff options
context:
space:
mode:
authorsje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-01-29 04:23:17 +0000
committersje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-01-29 04:23:17 +0000
commit257363a0670c97153cac88810144b427f6ecde1b (patch)
tree99b2da4052cda7cf5b43d98514f0d78a6acc1508 /iax/dllmain.cpp
parente072a9d4ca99886d6cb44eb526e25eb6c04101b7 (diff)
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
Diffstat (limited to 'iax/dllmain.cpp')
-rw-r--r--iax/dllmain.cpp9
1 files changed, 7 insertions, 2 deletions
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;
}