Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/common
Modified Files:
evas_pipe.c
Log Message:
get rid of 0 byte alloc
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_pipe.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- evas_pipe.c 12 Apr 2008 00:32:25 -0000 1.10
+++ evas_pipe.c 3 May 2008 05:32:13 -0000 1.11
@@ -38,8 +38,13 @@
evas_common_pipe_draw_context_copy(RGBA_Draw_Context *dc, RGBA_Pipe_Op *op)
{
memcpy(&(op->context), dc, sizeof(RGBA_Draw_Context));
- op->context.cutout.rects = malloc(sizeof(Cutout_Rect) *
op->context.cutout.active);
- memcpy(op->context.cutout.rects, dc->cutout.rects, sizeof(Cutout_Rect) *
op->context.cutout.active);
+ if (op->context.cutout.active > 0)
+ {
+ op->context.cutout.rects = malloc(sizeof(Cutout_Rect) *
op->context.cutout.active);
+ memcpy(op->context.cutout.rects, dc->cutout.rects, sizeof(Cutout_Rect)
* op->context.cutout.active);
+ }
+ else
+ op->context.cutout.rects = NULL;
}
static void
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs