mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
removed an ASSERT that occured when system ran out of GDI handles, and added more correct error handling for the condition
svn path=/trunk/; revision=11974
This commit is contained in:
parent
4b3c9f12ad
commit
902d0f0826
2 changed files with 21 additions and 7 deletions
|
@ -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: cliprgn.c,v 1.42 2004/07/14 20:48:58 navaraf Exp $ */
|
||||
/* $Id: cliprgn.c,v 1.43 2004/12/07 19:53:44 royce Exp $ */
|
||||
#include <w32k.h>
|
||||
|
||||
int FASTCALL
|
||||
|
@ -43,9 +43,13 @@ CLIPPING_UpdateGCRegion(DC* Dc)
|
|||
CombinedRegion->rdh.nCount,
|
||||
(PRECTL)CombinedRegion->Buffer,
|
||||
(PRECTL)&CombinedRegion->rdh.rcBound);
|
||||
ASSERT(Dc->CombinedClip != NULL);
|
||||
|
||||
RGNDATA_UnlockRgn(Dc->w.hGCClipRgn);
|
||||
if ( NULL == Dc->CombinedClip )
|
||||
{
|
||||
DPRINT1("IntEngCreateClipRegion() failed\n");
|
||||
return ERROR;
|
||||
}
|
||||
return NtGdiOffsetRgn(Dc->w.hGCClipRgn, -Dc->w.DCOrgX, -Dc->w.DCOrgY);
|
||||
}
|
||||
|
||||
|
@ -99,7 +103,8 @@ NtGdiSelectVisRgn(HDC hdc, HRGN hrgn)
|
|||
}
|
||||
|
||||
retval = NtGdiCombineRgn(dc->w.hVisRgn, hrgn, 0, RGN_COPY);
|
||||
CLIPPING_UpdateGCRegion(dc);
|
||||
if ( retval != ERROR )
|
||||
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.147 2004/11/16 16:27:49 blight Exp $
|
||||
/* $Id: dc.c,v 1.148 2004/12/07 19:53:44 royce Exp $
|
||||
*
|
||||
* DC.C - Device context functions
|
||||
*
|
||||
|
@ -1223,7 +1223,11 @@ NtGdiSetDCState ( HDC hDC, HDC hDCSave )
|
|||
|
||||
dc->w.hClipRgn = 0;
|
||||
}
|
||||
CLIPPING_UpdateGCRegion( dc );
|
||||
{
|
||||
int res;
|
||||
res = CLIPPING_UpdateGCRegion( dc );
|
||||
ASSERT ( res != ERROR );
|
||||
}
|
||||
DC_UnlockDc ( hDC );
|
||||
#else
|
||||
DC_UnlockDc ( hDC );
|
||||
|
@ -2022,8 +2026,13 @@ DC_InitDC(HDC DCHandle)
|
|||
NtGdiSelectObject(DCHandle, NtGdiGetStockObject( BLACK_PEN ));
|
||||
//NtGdiSelectObject(DCHandle, hFont);
|
||||
|
||||
// CLIPPING_UpdateGCRegion(DCToInit);
|
||||
|
||||
/*
|
||||
{
|
||||
int res;
|
||||
res = CLIPPING_UpdateGCRegion(DCToInit);
|
||||
ASSERT ( res != ERROR );
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
VOID FASTCALL
|
||||
|
|
Loading…
Reference in a new issue