mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-21 06:45:32 -06:00
Preserve nullptr if native module name is null or empty.
This commit is contained in:
parent
3ccc077406
commit
074ff2a093
1 changed files with 2 additions and 1 deletions
|
|
@ -22,7 +22,8 @@ static QString nativeModule;
|
|||
|
||||
static void* getExportedFunction(const char* symbolName) {
|
||||
#ifdef _WIN32
|
||||
HMODULE library = GetModuleHandle(nativeModule.toLocal8Bit());
|
||||
HMODULE library = GetModuleHandle(nativeModule.isNull() || nativeModule.isEmpty() ? nullptr
|
||||
: nativeModule.toLocal8Bit());
|
||||
FARPROC symbol = GetProcAddress(library, symbolName);
|
||||
return (void*)symbol;
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue