mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +00:00
fixed returning uninitialized variable in NtGdiSelectVisRgn() and NtGdiExtSelectClipRgn()
svn path=/trunk/; revision=9498
This commit is contained in:
parent
8158fc02d0
commit
6248b04e6f
2 changed files with 13 additions and 6 deletions
|
@ -16,10 +16,10 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: cliprgn.c,v 1.39 2004/05/15 20:19:20 weiden Exp $ */
|
||||
/* $Id: cliprgn.c,v 1.40 2004/05/26 18:49:06 weiden Exp $ */
|
||||
#include <w32k.h>
|
||||
|
||||
VOID FASTCALL
|
||||
int FASTCALL
|
||||
CLIPPING_UpdateGCRegion(DC* Dc)
|
||||
{
|
||||
PROSRGNDATA CombinedRegion;
|
||||
|
@ -46,7 +46,7 @@ CLIPPING_UpdateGCRegion(DC* Dc)
|
|||
ASSERT(Dc->CombinedClip != NULL);
|
||||
|
||||
RGNDATA_UnlockRgn(Dc->w.hGCClipRgn);
|
||||
NtGdiOffsetRgn(Dc->w.hGCClipRgn, -Dc->w.DCOrgX, -Dc->w.DCOrgY);
|
||||
return NtGdiOffsetRgn(Dc->w.hGCClipRgn, -Dc->w.DCOrgX, -Dc->w.DCOrgY);
|
||||
}
|
||||
|
||||
HRGN WINAPI SaveVisRgn(HDC hdc)
|
||||
|
@ -128,6 +128,7 @@ int STDCALL NtGdiExtSelectClipRgn(HDC hDC,
|
|||
{
|
||||
NtGdiDeleteObject(dc->w.hClipRgn);
|
||||
dc->w.hClipRgn = NULL;
|
||||
retval = NULLREGION;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -162,7 +163,7 @@ int STDCALL NtGdiExtSelectClipRgn(HDC hDC,
|
|||
NtGdiCombineRgn(dc->w.hClipRgn, dc->w.hClipRgn, hrgn, fnMode);
|
||||
}
|
||||
|
||||
CLIPPING_UpdateGCRegion(dc);
|
||||
retval = CLIPPING_UpdateGCRegion(dc);
|
||||
DC_UnlockDc( hDC );
|
||||
|
||||
return retval;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: dc.c,v 1.135 2004/05/14 16:55:18 navaraf Exp $
|
||||
/* $Id: dc.c,v 1.136 2004/05/26 18:49:06 weiden Exp $
|
||||
*
|
||||
* DC.C - Device context functions
|
||||
*
|
||||
|
@ -1756,7 +1756,7 @@ NtGdiSelectObject(HDC hDC, HGDIOBJ hGDIObj)
|
|||
USHORT Mode;
|
||||
|
||||
if(!hDC || !hGDIObj) return NULL;
|
||||
|
||||
|
||||
dc = DC_LockDc(hDC);
|
||||
if (NULL == dc)
|
||||
{
|
||||
|
@ -1949,6 +1949,12 @@ NtGdiSelectObject(HDC hDC, HGDIOBJ hGDIObj)
|
|||
|
||||
case GDI_OBJECT_TYPE_REGION:
|
||||
DC_UnlockDc (hDC);
|
||||
/*
|
||||
* The return value is one of the following values:
|
||||
* SIMPLEREGION
|
||||
* COMPLEXREGION
|
||||
* NULLREGION
|
||||
*/
|
||||
return (HGDIOBJ) NtGdiSelectClipRgn(hDC, (HRGN) hGDIObj);
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue