summaryrefslogtreecommitdiff
path: root/plugins/DbChecker
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-09-22 17:25:09 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-09-22 17:25:09 +0300
commitff2cc14d98302afd6faf2e5afa135785fd0703a0 (patch)
tree6b518d939ecafd7d27d49973e4871ac4efe904d5 /plugins/DbChecker
parent9337ab535d9a9492d20e743a178a9198c47f19f2 (diff)
crash fix
Diffstat (limited to 'plugins/DbChecker')
-rw-r--r--plugins/DbChecker/src/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/DbChecker/src/main.cpp b/plugins/DbChecker/src/main.cpp
index a1ed63a1f9..b4123abe50 100644
--- a/plugins/DbChecker/src/main.cpp
+++ b/plugins/DbChecker/src/main.cpp
@@ -58,6 +58,8 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SERVIC
/////////////////////////////////////////////////////////////////////////////////////////
+static HANDLE hService; // do not remove it!
+
static INT_PTR ServiceMode(WPARAM, LPARAM)
{
bLaunchMiranda = bShortMode = bAutoExit = false;
@@ -81,11 +83,12 @@ extern "C" __declspec(dllexport) int Load(void)
mir_getLP(&pluginInfoEx);
CreateServiceFunction(MS_DB_CHECKPROFILE, CheckProfile);
- CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceMode);
+ hService = CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceMode);
return 0;
}
extern "C" __declspec(dllexport) int Unload(void)
{
+ DestroyServiceFunction(hService);
return 0;
}