diff options
author | George Hazan <george.hazan@gmail.com> | 2014-08-21 13:54:57 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-08-21 13:54:57 +0000 |
commit | 58a095d86696c7b84757c7a813a502d812105733 (patch) | |
tree | da01c5742d6c923bea51c6a7e602f7adcfb22cb5 | |
parent | e9c3e5ef054efc0904bf2f6044c3cae3751e74b5 (diff) |
missing check added
git-svn-id: http://svn.miranda-ng.org/main/trunk@10262 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-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));
|