summaryrefslogtreecommitdiff
path: root/plugins/DbEditorPP/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/DbEditorPP/src')
-rw-r--r--plugins/DbEditorPP/src/main.cpp10
1 files changed, 6 insertions, 4 deletions
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
}