fixup! Win32: simplify loading of DLL functions

This commit is contained in:
Johannes Schindelin
2016-06-18 14:38:36 +02:00
parent 4c30620104
commit edf6d16eed

View File

@@ -66,8 +66,9 @@ static inline void *get_proc_addr(struct proc_addr *proc)
{
/* only do this once */
if (!proc->initialized) {
HANDLE hnd;
proc->initialized = 1;
HANDLE hnd = LoadLibraryA(proc->dll);
hnd = LoadLibraryA(proc->dll);
if (hnd)
proc->pfunction = GetProcAddress(hnd, proc->function);
}