elementary/glview - don't be crash even if glview is failed allocating
authorChunEon Park <hermet@hermet.pe.kr>
Wed, 31 Oct 2012 11:41:01 +0000 (11:41 +0000)
committerChunEon Park <hermet@hermet.pe.kr>
Wed, 31 Oct 2012 11:41:01 +0000 (11:41 +0000)
SVN revision: 78703

ChangeLog
NEWS
src/lib/elm_glview.c

index f36d0e8..27b0e2a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 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 (file)
--- 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:
 
index db12c9c..b9ec7da 100644 (file)
@@ -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);