mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-11-22 13:47:11 +00:00
Fix a crash caused by trying to load a custom provider
This commit is contained in:
1 parent
0c29007167
commit
d6876e68cd
1 file changed
+3
-3
@@ -197,12 +197,12 @@ inline bool HasExport(const std::string& name, Kind kind, const char* exportName
|
||||
|
||||
if (inserted)
|
||||
{
|
||||
auto image = KernelBaseProxy::LoadLibraryExW_()(path.c_str(), NULL,
|
||||
LOAD_LIBRARY_AS_IMAGE_RESOURCE | LOAD_LIBRARY_AS_DATAFILE);
|
||||
// Normal call on purpose
|
||||
auto image = LoadLibraryExW(path.c_str(), NULL, LOAD_LIBRARY_AS_IMAGE_RESOURCE | LOAD_LIBRARY_AS_DATAFILE);
|
||||
it->second = ManualGetProcAddress(image, exportName) != nullptr;
|
||||
|
||||
if (image != nullptr)
|
||||
KernelBaseProxy::FreeLibrary_()(image);
|
||||
FreeLibrary(image);
|
||||
}
|
||||
|
||||
return it->second;
|
||||
|
||||
Reference in new issue
Block a user