From 5c8670fb2b956f0040b675311f13ab6a4008b040 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Wed, 2 Aug 2017 11:15:08 +0900 Subject: [PATCH] ecore_x: Avoid crash on NULL This happens in E with software compositing, since E's commit 5702f0975e890f07cfb. E should be fixed shortly but segv is not acceptable. Without segv E is still massively broken so it's not like the bug would be hidden (large black areas in windows, after switch vdesks with enough windows). --- src/lib/ecore_x/ecore_x_image.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/ecore_x/ecore_x_image.c b/src/lib/ecore_x/ecore_x_image.c index 016323c175..3b7030863f 100644 --- a/src/lib/ecore_x/ecore_x_image.c +++ b/src/lib/ecore_x/ecore_x_image.c @@ -502,6 +502,9 @@ ecore_x_image_to_argb_convert(void *src, }; int mode = 0; + EINA_SAFETY_ON_NULL_RETURN_VAL(src, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(dst, EINA_FALSE); + sbpp *= 8; n = vis->map_entries;