Commit f4b6e82b authored by Bertho Stultiens's avatar Bertho Stultiens Committed by Alexandre Julliard

Do not increment module refCount if self is loaded from within

DllEntryPoint during the attach notification.
parent c77fd5b3
......@@ -1252,7 +1252,8 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD flags )
/* Check for already loaded module */
if((pwm = MODULE_FindModule(libname)))
{
pwm->refCount++;
if(!(pwm->flags & WINE_MODREF_MARKER))
pwm->refCount++;
TRACE(module, "Already loaded module '%s' at 0x%08x, count=%d, \n", libname, pwm->module, pwm->refCount);
LeaveCriticalSection(&PROCESS_Current()->crit_section);
return pwm;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment