From 39340f65cf17e06b4c8a3165c035bfc03f88c0b2 Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Wed, 31 Oct 2012 11:41:01 +0000 Subject: [PATCH] elementary/glview - don't be crash even if glview is failed allocating SVN revision: 78703 --- ChangeLog | 4 ++++ NEWS | 1 + src/lib/elm_glview.c | 7 ++++--- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f36d0e8..27b0e2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -648,3 +648,7 @@ 2012-10-30 ChunEon Park (Hermet) * Fix the transit to accept proxy object. + +2012-10-31 TaeHwan Kim (Bluezery) + + * Don't crash glview even if you failed to create obj. diff --git a/NEWS b/NEWS index 89a7783..3193c60 100644 --- a/NEWS +++ b/NEWS @@ -48,6 +48,7 @@ Fixes: * Fixed gengrid wrong_calc_job parameter. * Fix elm_transit image animation that last few frames are skipped. * FIx elm_transit to accept proxy object. + * Fix glview crash even if the object is failed allocating. Removals: diff --git a/src/lib/elm_glview.c b/src/lib/elm_glview.c index db12c9c..b9ec7da 100644 --- a/src/lib/elm_glview.c +++ b/src/lib/elm_glview.c @@ -203,7 +203,6 @@ _elm_glview_smart_add(Evas_Object *obj) if (!priv->config) { ERR("Failed Creating a Config Object.\n"); - evas_object_del(obj); evas_gl_free(priv->evasgl); priv->evasgl = NULL; @@ -234,7 +233,6 @@ _elm_glview_smart_add(Evas_Object *obj) if (!priv->context) { ERR("Error Creating an Evas_GL Context.\n"); - evas_object_del(obj); evas_gl_config_free(priv->config); evas_gl_free(priv->evasgl); @@ -306,7 +304,10 @@ elm_glview_add(Evas_Object *parent) ELM_GLVIEW_DATA_GET(obj, sd); if (!sd->evasgl) - return NULL; + { + evas_object_del(obj); + return NULL; + } if (!elm_widget_sub_object_add(parent, obj)) ERR("could not add %p as sub object of %p", obj, parent); -- 2.7.4