diff options
author | George Hazan <ghazan@miranda.im> | 2022-09-11 11:50:24 -0700 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-09-11 11:50:24 -0700 |
commit | 98a8fe5886249fe437caa406c94e1364667c3baa (patch) | |
tree | d0bb99e3bb2f848f3aefc3c514ef5a314934b05f | |
parent | 7695eaff5071c5aa821eab4cedcad9fa58bc5b17 (diff) |
fixes #3163 (HistoryPP: проблемы с выгрузкой плагина)
-rw-r--r-- | src/mir_app/src/newplugins.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mir_app/src/newplugins.cpp b/src/mir_app/src/newplugins.cpp index 4b12871980..4dca4ebb85 100644 --- a/src/mir_app/src/newplugins.cpp +++ b/src/mir_app/src/newplugins.cpp @@ -513,15 +513,18 @@ bool TryLoadPlugin(pluginEntry *p, bool bDynamic) MUUID *piface = p->m_pInterfaces;
for (int i = 0; piface[i] != miid_last; i++) {
int idx = getDefaultPluginIdx(piface[i]);
- if (idx != -1 && pluginDefault[idx].pImpl) {
+ auto *pOldPlugin = pluginDefault[idx].pImpl;
+ if (idx != -1 && pOldPlugin) {
if (!bDynamic) { // this place is already occupied, skip & disable
SetPluginOnWhiteList(p->pluginname, false);
return false;
}
// we're loading new implementation dynamically, let the old one die
- if (!p->bIsCore)
- Plugin_UnloadDyn(pluginDefault[idx].pImpl);
+ if (!p->bIsCore) {
+ SetPluginOnWhiteList(pOldPlugin->pluginname, false);
+ Plugin_UnloadDyn(pOldPlugin);
+ }
}
}
}
|