From 4579351044c7c214e44c35816a9ac0934b7ecdf4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 29 Jul 2012 09:00:51 +0000 Subject: fix for mishmash in the protocol load order git-svn-id: http://svn.miranda-ng.org/main/trunk@1239 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/plugins/newplugins.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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; } } } } -- cgit v1.2.3