summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Import/src/miranda.cpp8
-rw-r--r--src/modules/plugins/newplugins.cpp8
2 files changed, 10 insertions, 6 deletions
diff --git a/plugins/Import/src/miranda.cpp b/plugins/Import/src/miranda.cpp
index 9e809975a7..33bd6964c1 100644
--- a/plugins/Import/src/miranda.cpp
+++ b/plugins/Import/src/miranda.cpp
@@ -133,7 +133,7 @@ INT_PTR CALLBACK MirandaPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPa
break;
case IDC_LIST:
- if(HIWORD(wParam)==LBN_SELCHANGE) {
+ if (HIWORD(wParam)==LBN_SELCHANGE) {
int sel = SendDlgItemMessage(hdlg, IDC_LIST, LB_GETCURSEL, 0, 0);
if (sel == LB_ERR) break;
SetDlgItemText(hdlg, IDC_FILENAME, (TCHAR*)SendDlgItemMessage(hdlg, IDC_LIST, LB_GETITEMDATA, sel, 0));
@@ -200,7 +200,7 @@ INT_PTR CALLBACK MirandaOptionsPageProc(HWND hdlg,UINT message,WPARAM wParam,LPA
break;
case IDOK:
- if(IsDlgButtonChecked(hdlg,IDC_RADIO_ALL)) {
+ if (IsDlgButtonChecked(hdlg,IDC_RADIO_ALL)) {
nImportOption = IMPORT_ALL;
nCustomOptions = 0;//IOPT_MSGSENT|IOPT_MSGRECV|IOPT_URLSENT|IOPT_URLRECV;
DoImport = MirandaImport;
@@ -208,7 +208,7 @@ INT_PTR CALLBACK MirandaOptionsPageProc(HWND hdlg,UINT message,WPARAM wParam,LPA
break;
}
- if(IsDlgButtonChecked(hdlg,IDC_RADIO_CONTACTS)) {
+ if (IsDlgButtonChecked(hdlg,IDC_RADIO_CONTACTS)) {
nImportOption = IMPORT_CONTACTS;
nCustomOptions = 0;
DoImport = MirandaImport;
@@ -216,7 +216,7 @@ INT_PTR CALLBACK MirandaOptionsPageProc(HWND hdlg,UINT message,WPARAM wParam,LPA
break;
}
- if(IsDlgButtonChecked(hdlg,IDC_RADIO_CUSTOM)) {
+ if (IsDlgButtonChecked(hdlg,IDC_RADIO_CUSTOM)) {
PostMessage(GetParent(hdlg),WIZM_GOTOPAGE,IDD_ADVOPTIONS,(LPARAM)MirandaAdvOptionsPageProc);
break;
}
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp
index 7bdd1d87b1..f583b2aa09 100644
--- a/src/modules/plugins/newplugins.cpp
+++ b/src/modules/plugins/newplugins.cpp
@@ -103,9 +103,13 @@ bool hasMuuid(const BASIC_PLUGIN_INFO& bpi, const MUUID& uuid)
int getDefaultPluginIdx(const MUUID& muuid)
{
- for (int i=0; i < SIZEOF(pluginDefault); i++)
+ for (int i=0; i < SIZEOF(pluginDefault); i++) {
+ if (pluginDefault[i].stdplugname == NULL)
+ break;
+
if (equalUUID(muuid, pluginDefault[i].uuid))
return i;
+ }
return -1;
}
@@ -479,7 +483,7 @@ bool TryLoadPlugin(pluginEntry *p, bool bDynamic)
SetPluginOnWhiteList(p->pluginname, 0);
return false;
}
- if ( !(p->pclass & PCLASS_CORE)) {
+ if (bDynamic && !(p->pclass & PCLASS_CORE)) {
Plugin_UnloadDyn(pluginDefault[idx].pImpl);
pluginDefault[idx].pImpl = NULL;
} } } }