Commit c5c48eb6 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed reference count handling to support LoadLibrary during a process

attach.
parent 3d8820ea
......@@ -1252,8 +1252,7 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HANDLE hfile, DWORD flags )
}
if (pwm)
{
if(!(pwm->flags & WINE_MODREF_MARKER))
pwm->refCount++;
pwm->refCount++;
if ((pwm->flags & WINE_MODREF_DONT_RESOLVE_REFS) &&
!(flags & DONT_RESOLVE_DLL_REFERENCES))
......@@ -1312,7 +1311,7 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HANDLE hfile, DWORD flags )
TRACE_(loaddll)("Loaded module '%s' : %s\n", filename, filetype);
/* Set the refCount here so that an attach failure will */
/* decrement the dependencies through the MODULE_FreeLibrary call. */
pwm->refCount++;
pwm->refCount = 1;
if (allocated_libdir)
{
......
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