Author: gschneider Date: Sun Aug 16 21:20:50 2009 New Revision: 42741
URL: http://svn.reactos.org/svn/reactos?rev=42741&view=rev Log: Allocate span memory for every clipping type, not only for one
Modified: trunk/reactos/subsystems/win32/win32k/eng/clip.c
Modified: trunk/reactos/subsystems/win32/win32k/eng/clip.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/eng... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/clip.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/clip.c [iso-8859-1] Sun Aug 16 21:20:50 2009 @@ -406,18 +406,21 @@
ASSERT(Boundary->top <= Boundary->bottom && Boundary->left <= Boundary->right);
- *Spans = NULL; + *Count = Boundary->bottom - Boundary->top; + if (*Count > 0) + { + *Spans = ExAllocatePoolWithTag(PagedPool, *Count * sizeof(SPAN), TAG_CLIP); + if (NULL == *Spans) + { + *Count = 0; + return FALSE; + } + } + if (NULL == ClipRegion || DC_TRIVIAL == ClipRegion->iDComplexity) { - *Count = Boundary->bottom - Boundary->top; if (0 != *Count) { - *Spans = ExAllocatePoolWithTag(PagedPool, *Count * sizeof(SPAN), TAG_CLIP); - if (NULL == *Spans) - { - *Count = 0; - return FALSE; - } for (i = 0; i < Boundary->bottom - Boundary->top; i++) { (*Spans)[i].X = Boundary->left;