1
0
Fork 0

Fix loading plugins more than once, remove obsolete isLoaded member

This commit is contained in:
ζeh Matt 2023-09-21 10:59:11 +03:00
parent 517c82604f
commit 7fcb626ba2
No known key found for this signature in database
GPG Key ID: 18CE582C71A225B0
2 changed files with 1 additions and 3 deletions

View File

@ -138,7 +138,7 @@ bool pluginload(const char* pluginName, bool loadall)
EXCLUSIVE_ACQUIRE(LockPluginList);
for(auto it = pluginList.begin(); it != pluginList.end(); ++it)
{
if(_stricmp(it->plugname, name.c_str()) == 0 && it->isLoaded)
if(_stricmp(it->plugname, name.c_str()) == 0)
{
dprintf(QT_TRANSLATE_NOOP("DBG", "[PLUGIN] %s already loaded\n"), name);
SetCurrentDirectoryW(currentDir);
@ -300,7 +300,6 @@ bool pluginload(const char* pluginName, bool loadall)
setupStruct.hMenuSymmod = pluginData.hMenuSymmod;
pluginData.plugsetup(&setupStruct);
}
pluginData.isLoaded = true;
curPluginHandle++;
if(!loadall)

View File

@ -26,7 +26,6 @@ struct PLUG_DATA
{
char plugpath[MAX_PATH];
char plugname[MAX_PATH];
bool isLoaded;
HINSTANCE hPlugin;
PLUGINIT pluginit;
PLUGSTOP plugstop;