mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 21:56:40 +00:00
- LdrpAttachToProcess() should be called only once per process, so added the check. This fixes a crash when trying to start any app using MFC42.DLL, including 1C.
See issue #2730 for more details. svn path=/trunk/; revision=29636
This commit is contained in:
parent
6d8670a692
commit
db0466d5e3
|
@ -747,11 +747,14 @@ LdrLoadDll (IN PWSTR SearchPath OPTIONAL,
|
|||
|
||||
if (NT_SUCCESS(Status) &&
|
||||
(!LoadFlags || 0 == (*LoadFlags & LOAD_LIBRARY_AS_DATAFILE)))
|
||||
{
|
||||
if (!(Module->Flags & LDRP_PROCESS_ATTACH_CALLED))
|
||||
{
|
||||
RtlEnterCriticalSection(Peb->LoaderLock);
|
||||
Status = LdrpAttachProcess();
|
||||
RtlLeaveCriticalSection(Peb->LoaderLock);
|
||||
}
|
||||
}
|
||||
|
||||
if ((!Module) && (NT_SUCCESS(Status)))
|
||||
return Status;
|
||||
|
|
Loading…
Reference in a new issue