diff options
-rw-r--r-- | src/core/modules.cpp | 2 | ||||
-rw-r--r-- | 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));
|