diff options
author | George Hazan <george.hazan@gmail.com> | 2024-10-17 19:40:10 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-10-17 19:40:10 +0300 |
commit | bc2acff2ff61f3f929081798181422e6aceed4fa (patch) | |
tree | ce22eb7155f20a930261721100e89061d385a1dd /src/mir_app | |
parent | b1800acb65fa4eb0c3248772b50c036cf474d1f2 (diff) |
fix for plugins' options
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/newplugins.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/pluginopts.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/plugins.h | 1 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/mir_app/src/newplugins.cpp b/src/mir_app/src/newplugins.cpp index 022570fb8b..7e029b5479 100644 --- a/src/mir_app/src/newplugins.cpp +++ b/src/mir_app/src/newplugins.cpp @@ -32,8 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define PLUGINDISABLELIST "PluginDisable"
-extern CMPluginBase *g_pLastPlugin;
-
bool g_bReadyToInitClist = false, g_bLoadStd = false;
void LoadExtraIconsModule();
diff --git a/src/mir_app/src/pluginopts.cpp b/src/mir_app/src/pluginopts.cpp index 761f55b85a..632fdbe190 100644 --- a/src/mir_app/src/pluginopts.cpp +++ b/src/mir_app/src/pluginopts.cpp @@ -110,12 +110,12 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA *fd, wchar_t *path, WPARAM, LPARAM if (h == nullptr)
return true;
- ppb = &GetPluginByInstance(h);
- if (ppb->getInst() != h) {
+ if (!g_pLastPlugin || g_pLastPlugin->getInst() != h) {
FreeLibrary(h);
return true;
}
+ ppb = g_pLastPlugin;
bNeedsFree = true;
}
else {
diff --git a/src/mir_app/src/plugins.h b/src/mir_app/src/plugins.h index 5130d2bbfc..51035e2c4c 100644 --- a/src/mir_app/src/plugins.h +++ b/src/mir_app/src/plugins.h @@ -56,6 +56,7 @@ struct pluginEntry extern LIST<pluginEntry> pluginList, servicePlugins, clistPlugins;
extern MUUID miid_last;
extern bool g_bLoadStd;
+extern CMPluginBase *g_pLastPlugin;
int PluginOptionsInit(WPARAM, LPARAM);
|