From e69cfe39437bdfea1280daec74704c81a41ea3f6 Mon Sep 17 00:00:00 2001 From: "chuneon.park" Date: Mon, 21 Feb 2011 17:42:43 +0900 Subject: [PATCH] fixed color convert logic error(sorry, cause of conflict, im re-committing again) --- src/lib/engines/common/evas_convert_colorspace.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/engines/common/evas_convert_colorspace.c b/src/lib/engines/common/evas_convert_colorspace.c index 2886133..fa5faec 100644 --- a/src/lib/engines/common/evas_convert_colorspace.c +++ b/src/lib/engines/common/evas_convert_colorspace.c @@ -55,13 +55,15 @@ evas_common_convert_argb8888_to_a8(void *data, int w, int h, int stride, Eina_Bo src = data; end = src + (stride * h); ret = malloc(w * h); + if (!ret) return NULL; if (!has_alpha) { - return memset(ret,0xff, w * h); + return memset(ret, 0xff, w * h); } - for ( ; src < end ; src ++, dst ++) + dst = ret; + for ( ; src < end ; src++, dst++) *dst = CONVERT_ARGB_8888_TO_A_8(*src); return ret; } -- 2.7.4