From 58a095d86696c7b84757c7a813a502d812105733 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 21 Aug 2014 13:54:57 +0000 Subject: missing check added git-svn-id: http://svn.miranda-ng.org/main/trunk@10262 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/modules.cpp | 2 +- src/modules/database/profilemanager.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/modules.cpp b/src/core/modules.cpp index 69da44111a..0fd4f58d57 100644 --- a/src/core/modules.cpp +++ b/src/core/modules.cpp @@ -123,7 +123,7 @@ int LoadDefaultModules(void) // if ( LoadErrorsModule()) return 1; - switch ( LoadServiceModePlugin()) { + switch (LoadServiceModePlugin()) { case SERVICE_CONTINUE: // continue loading Miranda normally break; case SERVICE_ONLYDB: // load database and go to the message cycle diff --git a/src/modules/database/profilemanager.cpp b/src/modules/database/profilemanager.cpp index ec1ef88ee1..540a95f45e 100644 --- a/src/modules/database/profilemanager.cpp +++ b/src/modules/database/profilemanager.cpp @@ -822,7 +822,8 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam, LRESULT curSel = SendDlgItemMessage(hwndDlg, IDC_SM_COMBO, CB_GETCURSEL, 0, 0); if (curSel != CB_ERR) { int idx = SendDlgItemMessage(hwndDlg, IDC_SM_COMBO, CB_GETITEMDATA, (WPARAM)curSel, 0); - SetServiceModePlugin(servicePlugins[idx]); + if (idx != CB_ERR) + SetServiceModePlugin(servicePlugins[idx]); } } DestroyIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, 0)); -- cgit v1.2.3