mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 23:12:56 +00:00
(GDIOBJ_SetOwnership): Don't try to decrease the GDI object counter for global handles since they're not associated with process.
svn path=/trunk/; revision=14166
This commit is contained in:
parent
02755a61f0
commit
a384c6e670
1 changed files with 9 additions and 6 deletions
|
@ -1216,15 +1216,18 @@ LockHandle:
|
||||||
|
|
||||||
/* dereference the process' object counter */
|
/* dereference the process' object counter */
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
Status = PsLookupProcessByProcessId((HANDLE)((ULONG_PTR)PrevProcId & ~0x1), &OldProcess);
|
if((ULONG_PTR)PrevProcId & ~0x1)
|
||||||
if(NT_SUCCESS(Status))
|
|
||||||
{
|
{
|
||||||
W32Process = OldProcess->Win32Process;
|
Status = PsLookupProcessByProcessId((HANDLE)((ULONG_PTR)PrevProcId & ~0x1), &OldProcess);
|
||||||
if(W32Process != NULL)
|
if(NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
InterlockedDecrement(&W32Process->GDIObjects);
|
W32Process = OldProcess->Win32Process;
|
||||||
|
if(W32Process != NULL)
|
||||||
|
{
|
||||||
|
InterlockedDecrement(&W32Process->GDIObjects);
|
||||||
|
}
|
||||||
|
ObDereferenceObject(OldProcess);
|
||||||
}
|
}
|
||||||
ObDereferenceObject(OldProcess);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(NewOwner != NULL)
|
if(NewOwner != NULL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue