summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-29 09:00:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-29 09:00:51 +0000
commit4579351044c7c214e44c35816a9ac0934b7ecdf4 (patch)
tree4525f22f7d4b91d0b436e310003585658002f2bd /src/modules
parent1b42f0a02a8d51c279c19ed7abac45c4cf964976 (diff)
fix for mishmash in the protocol load order
git-svn-id: http://svn.miranda-ng.org/main/trunk@1239 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/plugins/newplugins.cpp8
1 files changed, 6 insertions, 2 deletions
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;
} } } }