From 0d048c3e47d3c0091380df192c7f5d9f62f9570e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Thu, 18 Sep 2014 13:27:02 +0000 Subject: [PATCH] [WIN32K] - Fix error handling in NtGdiPathToRegion svn path=/trunk/; revision=64190 --- reactos/win32ss/gdi/ntgdi/path.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reactos/win32ss/gdi/ntgdi/path.c b/reactos/win32ss/gdi/ntgdi/path.c index 8d7e34e60f9..d7af75a9001 100644 --- a/reactos/win32ss/gdi/ntgdi/path.c +++ b/reactos/win32ss/gdi/ntgdi/path.c @@ -2716,19 +2716,20 @@ NtGdiPathToRegion(HDC hDC) { PATH_UnlockPath(pPath); DC_UnlockDc(pDc); + return NULL; } hrgnRval = Rgn->BaseObject.hHmgr; /* FIXME: Should we empty the path even if conversion failed? */ if (PATH_PathToRegion(pPath, pdcattr->jFillMode, Rgn)) { PATH_EmptyPath(pPath); + RGNOBJAPI_Unlock(Rgn); } else { - GreDeleteObject(hrgnRval); + REGION_Delete(Rgn); hrgnRval = NULL; } - RGNOBJAPI_Unlock(Rgn); } PATH_UnlockPath(pPath); -- 2.17.1