diff options
author | George Hazan <ghazan@miranda.im> | 2023-03-01 18:21:07 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-03-01 18:21:07 +0300 |
commit | dc8c4db75a2cb08919e8df9d8be194661af18d5e (patch) | |
tree | 9b206cb48ae86b5db3355dc391d0bb71fb352984 /src | |
parent | e1dfabffb3c1c955b0944bc658e107b59a6e78c8 (diff) |
fixes #3373 (Scriver: crash on unload)
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdmsg/src/msglog.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/newplugins.cpp | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp index 13d193be03..7dddbcd10f 100644 --- a/src/core/stdmsg/src/msglog.cpp +++ b/src/core/stdmsg/src/msglog.cpp @@ -439,7 +439,7 @@ void LoadMsgLogIcons(void) void FreeMsgLogIcons(void)
{
for (auto &it : pLogIconBmpBits)
- mir_free(it);
+ replaceStr(it, 0);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/mir_app/src/newplugins.cpp b/src/mir_app/src/newplugins.cpp index 367afde7b0..d9508f7874 100644 --- a/src/mir_app/src/newplugins.cpp +++ b/src/mir_app/src/newplugins.cpp @@ -735,8 +735,15 @@ int LoadNewPluginsModule(void) SetPluginOnWhiteList(p->pluginname, plugin_clist == p);
// now loop thru and load all the other plugins, do this in one pass
- for (int i = 0; i < pluginList.getCount(); i++)
- TryLoadPlugin(pluginList[i], false);
+ for (int i = 0; i < pluginList.getCount(); i++) {
+ auto *p = pluginList[i];
+ if (!TryLoadPlugin(p, false)) {
+ if (!p->bFailed) {
+ Plugin_Uninit(p);
+ i--;
+ }
+ }
+ }
for (auto &it : servicePlugins.rev_iter())
if (!IsPluginOnWhiteList(it->pluginname))
|