[WIN32K] Fix missing NULL check in NtGdiPathToRegion

This commit is contained in:
Timo Kreuzer
2022-12-13 07:18:24 +01:00
parent 60af8194bb
commit 84b09285c8
+8
View File
@@ -2893,6 +2893,14 @@ NtGdiPathToRegion(HDC hDC)
hrgnRval = Rgn->BaseObject.hHmgr;
pNewPath = PATH_FlattenPath(pPath);
if (pNewPath == NULL)
{
ERR("Failed to flatten path %p\n", pDc->dclevel.hPath);
REGION_Delete(Rgn);
PATH_UnlockPath(pPath);
DC_UnlockDc(pDc);
return NULL;
}
Ret = PATH_PathToRegion(pNewPath, pdcattr->jFillMode, Rgn);