From 103cd538b9d17273050e0ce45d03aacb44443f99 Mon Sep 17 00:00:00 2001 From: raster Date: Fri, 29 Jul 2011 06:21:43 +0000 Subject: [PATCH] more error handling improvements git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@61879 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/ecore_evas/ecore_evas_buffer.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/lib/ecore_evas/ecore_evas_buffer.c b/src/lib/ecore_evas/ecore_evas_buffer.c index 1fed260..5f0ef27 100644 --- a/src/lib/ecore_evas/ecore_evas_buffer.c +++ b/src/lib/ecore_evas/ecore_evas_buffer.c @@ -594,8 +594,16 @@ ecore_evas_buffer_allocfunc_new(int w, int h, void *(*alloc_func) (void *data, i if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + ecore_evas_free(ee); + return NULL; } } + else + { + ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver); + ecore_evas_free(ee); + return NULL; + } evas_key_modifier_add(ee->evas, "Shift"); evas_key_modifier_add(ee->evas, "Control"); evas_key_modifier_add(ee->evas, "Alt"); @@ -765,8 +773,16 @@ ecore_evas_object_image_new(Ecore_Evas *ee_target) if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + ecore_evas_free(ee); + return NULL; } } + else + { + ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + ecore_evas_free(ee); + return NULL; + } evas_key_modifier_add(ee->evas, "Shift"); evas_key_modifier_add(ee->evas, "Control"); evas_key_modifier_add(ee->evas, "Alt"); -- 2.7.4