mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 05:37:44 +00:00
Fix bug spoted by Stefan100 on IRC.
svn path=/trunk/; revision=30287
This commit is contained in:
parent
375959c206
commit
28a73df1a2
|
@ -668,10 +668,20 @@ FASTCALL
|
|||
NtGdiDeleteObject(HGDIOBJ hObject)
|
||||
{
|
||||
DPRINT("NtGdiDeleteObject handle 0x%08x\n", hObject);
|
||||
|
||||
INT Index = GDI_HANDLE_GET_INDEX(hObject);
|
||||
PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
|
||||
// We check to see if the objects are knocking on deaths door.
|
||||
if ((Entry->Type & ~GDI_ENTRY_REUSE_MASK) != 0 && Entry->KernelData != NULL)
|
||||
{
|
||||
return NULL != hObject
|
||||
? GDIOBJ_FreeObj(GdiHandleTable, hObject, GDI_OBJECT_TYPE_DONTCARE) : FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINT1("Attempt DeleteObject 0x%x currently being destroyed!!!\n",hObject);
|
||||
return TRUE; // return true and move on.
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* Internal function. Called when the process is destroyed to free the remaining GDI handles.
|
||||
|
|
Loading…
Reference in a new issue