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);