From b1257cefe1001598566b7efba7fe0dd13e12782f Mon Sep 17 00:00:00 2001 From: Doug Lyons Date: Thu, 16 Jan 2025 19:11:19 -0600 Subject: [PATCH] [NTGDI] Silence some debug log spam from GreGetObjectOwner when input parameter is NULL. (#7606) CORE-19962 Co-authored-by: Timo Kreuzer --- win32ss/gdi/ntgdi/gdiobj.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/win32ss/gdi/ntgdi/gdiobj.c b/win32ss/gdi/ntgdi/gdiobj.c index 07c16e0bcae..00c85f5f9dc 100644 --- a/win32ss/gdi/ntgdi/gdiobj.c +++ b/win32ss/gdi/ntgdi/gdiobj.c @@ -1193,6 +1193,12 @@ GreGetObjectOwner(HGDIOBJ hobj) { ULONG ulIndex, ulOwner; + if (hobj == NULL) + { + DPRINT("GreGetObjectOwner: invalid NULL handle\n"); + return GDI_OBJ_HMGR_RESTRICTED; + } + /* Get the handle index */ ulIndex = GDI_HANDLE_GET_INDEX(hobj);