Do not increment module refCount if self is loaded from within

DllEntryPoint during the attach notification.
oldstable
Bertho Stultiens 1999-04-22 08:56:40 +00:00 committed by Alexandre Julliard
parent c77fd5b322
commit f4b6e82b84
1 changed files with 2 additions and 1 deletions

View File

@ -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;