From ff2cc14d98302afd6faf2e5afa135785fd0703a0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 22 Sep 2017 17:25:09 +0300 Subject: crash fix --- plugins/DbChecker/src/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins/DbChecker') 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; } -- cgit v1.2.3