mirror of
https://github.com/reactos/reactos.git
synced 2024-09-06 10:52:52 +00:00
Fix bug spoted by Stefan100 on IRC.
svn path=/trunk/; revision=30287
This commit is contained in:
parent
375959c206
commit
28a73df1a2
|
@ -668,9 +668,19 @@ 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.
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
Loading…
Reference in a new issue