Fix bug spoted by Stefan100 on IRC.

svn path=/trunk/; revision=30287
This commit is contained in:
James Tabor 2007-11-09 09:13:01 +00:00
parent 375959c206
commit 28a73df1a2

View file

@ -668,9 +668,19 @@ FASTCALL
NtGdiDeleteObject(HGDIOBJ hObject)
{
DPRINT("NtGdiDeleteObject handle 0x%08x\n", hObject);
return NULL != hObject
? GDIOBJ_FreeObj(GdiHandleTable, hObject, GDI_OBJECT_TYPE_DONTCARE) : FALSE;
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.
}
}
/*!