Author: spouliot
Date: 2006-06-02 14:48:04 -0400 (Fri, 02 Jun 2006)
New Revision: 61418
Modified:
trunk/libgdiplus/src/ChangeLog
trunk/libgdiplus/src/region.c
Log:
Fixed clone when the region is empty. Added error checking in
GdipCombineRegionRect if path creation fails.
Modified: trunk/libgdiplus/src/ChangeLog
===================================================================
--- trunk/libgdiplus/src/ChangeLog 2006-06-02 18:40:25 UTC (rev 61417)
+++ trunk/libgdiplus/src/ChangeLog 2006-06-02 18:48:04 UTC (rev 61418)
@@ -1,8 +1,10 @@
-2006-06-02 Sebastien Pouliot <[EMAIL PROTECTED]>
+2006-06-02 Sebastien Pouliot <[EMAIL PROTECTED]>
* graphics-path.c: Changed GdipWidenPath and GdipWrapPath to show a
warning and return Ok instead of NotImplemented (to avoid crash in
PDN).
+ * region.c: Fixed clone when the region is empty. Added error checking
+ in GdipCombineRegionRect if path creation fails.
2006-06-01 Sebastien Pouliot <[EMAIL PROTECTED]>
Modified: trunk/libgdiplus/src/region.c
===================================================================
--- trunk/libgdiplus/src/region.c 2006-06-02 18:40:25 UTC (rev 61417)
+++ trunk/libgdiplus/src/region.c 2006-06-02 18:48:04 UTC (rev 61418)
@@ -273,6 +273,7 @@
dest->rects = (GpRectF *) GdipAlloc (sizeof (GpRectF) *
source->cnt);
memcpy (dest->rects, source->rects, sizeof (GpRectF) *
source->cnt);
} else {
+ dest->cnt = 0;
dest->rects = NULL;
}
@@ -939,7 +940,9 @@
GpStatus status;
/* Convert GpRectF to GpPath and use GdipCombineRegionPath */
- GdipCreatePath (FillModeAlternate, &path);
+ status = GdipCreatePath (FillModeAlternate, &path);
+ if (status != Ok)
+ return status;
GdipAddPathRectangle (path, rect->X, rect->Y, rect->Width,
rect->Height);
status = GdipCombineRegionPath (region, path, combineMode);
GdipDeletePath (path);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches