summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-27 19:03:50 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-27 19:03:50 +0300
commitd98b43a55e6d05e3bda7875d4825aec9066acca8 (patch)
tree766ddd895db3519db388b7ad456bde08eb11253c
parente3b2425ac0e38ef35d6493edc4a0a211959eb91d (diff)
pre-check added for plugin dlls that weren't loaded yet
-rw-r--r--src/mir_app/src/pluginopts.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mir_app/src/pluginopts.cpp b/src/mir_app/src/pluginopts.cpp
index 2a6e5ba783..8a60b5c56e 100644
--- a/src/mir_app/src/pluginopts.cpp
+++ b/src/mir_app/src/pluginopts.cpp
@@ -62,7 +62,15 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA *fd, wchar_t *path, WPARAM, LPARAM
{
wchar_t buf[MAX_PATH];
mir_snwprintf(buf, L"%s\\Plugins\\%s", path, fd->cFileName);
+
+ // try to check a plugin without loading it first
HINSTANCE hInst = GetModuleHandle(buf);
+ if (hInst == nullptr) {
+ bool bIsPlugin = false;
+ mir_ptr<MUUID> pIds(GetPluginInterfaces(buf, bIsPlugin));
+ if (!bIsPlugin)
+ return TRUE;
+ }
BASIC_PLUGIN_INFO pi;
if (checkAPI(buf, &pi, CHECKAPI_NONE) == 0)