From 43fc37b844a3c9f32a2fda3fda751bbfdaa6a911 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 29 Mar 2018 15:45:41 +0300 Subject: fixes #1224 (Crash when launch in service mode) --- plugins/DbEditorPP/src/main.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'plugins') diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp index f72c886360..dcb399e72f 100644 --- a/plugins/DbEditorPP/src/main.cpp +++ b/plugins/DbEditorPP/src/main.cpp @@ -165,11 +165,13 @@ int PreShutdown(WPARAM, LPARAM) INT_PTR ServiceMode(WPARAM, LPARAM) { - IcoLibRegister(); - g_bServiceMode = true; - - HookEvent(ME_DB_CONTACT_SETTINGCHANGED, DBSettingChanged); + if (!g_bServiceMode) { + g_bServiceMode = true; + IcoLibRegister(); + HookEvent(ME_DB_CONTACT_SETTINGCHANGED, DBSettingChanged); + } + return SERVICE_ONLYDB; // load database and then call us } -- cgit v1.2.3