Fix thread-safety of qnetworkinterface_win.cpp:resolveLibs
Change-Id: Ia4b5103c9c590c24de9a43c5c7097b0c7b83e679 Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
parent
c72311440b
commit
4fbc63f03b
@ -58,11 +58,11 @@ static void resolveLibs()
|
||||
static bool done = false;
|
||||
|
||||
if (!done) {
|
||||
done = true;
|
||||
|
||||
HINSTANCE iphlpapiHnd = QSystemLibrary::load(L"iphlpapi");
|
||||
if (iphlpapiHnd == NULL)
|
||||
if (iphlpapiHnd == NULL) {
|
||||
done = true;
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(Q_OS_WINCE)
|
||||
ptrGetAdaptersInfo = (PtrGetAdaptersInfo)GetProcAddress(iphlpapiHnd, L"GetAdaptersInfo");
|
||||
@ -73,6 +73,7 @@ static void resolveLibs()
|
||||
ptrGetAdaptersAddresses = (PtrGetAdaptersAddresses)GetProcAddress(iphlpapiHnd, "GetAdaptersAddresses");
|
||||
ptrGetNetworkParams = (PtrGetNetworkParams)GetProcAddress(iphlpapiHnd, "GetNetworkParams");
|
||||
#endif
|
||||
done = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user