mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 22:04:55 +02:00
Fix possible PluginsManager FindClose WINAPI errors
Otherwise the ERROR_INVALID_HANDLE (0x6) can be triggered. Close #14356
This commit is contained in:
parent
1764758669
commit
ca403b6627
@ -447,7 +447,7 @@ bool PluginsManager::loadPlugins(const TCHAR* dir, const PluginViewList* pluginU
|
||||
pathAppend(pluginsFullPathFilter2, dllName2);
|
||||
|
||||
// get plugin
|
||||
if (hFindDll)
|
||||
if (hFindDll && (hFindDll != INVALID_HANDLE_VALUE))
|
||||
{
|
||||
::FindClose(hFindDll);
|
||||
hFindDll = INVALID_HANDLE_VALUE;
|
||||
@ -514,8 +514,10 @@ bool PluginsManager::loadPlugins(const TCHAR* dir, const PluginViewList* pluginU
|
||||
}
|
||||
|
||||
}
|
||||
::FindClose(hFindFolder);
|
||||
::FindClose(hFindDll);
|
||||
if (hFindFolder && (hFindFolder != INVALID_HANDLE_VALUE))
|
||||
::FindClose(hFindFolder);
|
||||
if (hFindDll && (hFindDll != INVALID_HANDLE_VALUE))
|
||||
::FindClose(hFindDll);
|
||||
|
||||
for (size_t i = 0, len = dllNames.size(); i < len; ++i)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user