summaryrefslogtreecommitdiff
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
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
-rw-r--r--iax/dllmain.cpp9
-rw-r--r--iax/private.h2
2 files changed, 8 insertions, 3 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;
}
diff --git a/iax/private.h b/iax/private.h
index 2a1a603..84ad034 100644
--- a/iax/private.h
+++ b/iax/private.h
@@ -4,7 +4,7 @@
/* VERSION DEFINITIONS */
#define VER_MAJOR 0
#define VER_MINOR 0
-#define VER_RELEASE 2
+#define VER_RELEASE 3
#define VER_BUILD 0
#define __STRINGIZE(x) #x