cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b0a4bf28086b72a5b1860cbfbf82e8e9670d1d2a

commit b0a4bf28086b72a5b1860cbfbf82e8e9670d1d2a
Author: Cedric BAIL <[email protected]>
Date:   Fri Mar 14 11:51:49 2014 +0900

    evas: if the class is the wrong one, you should not do the check after 
accessing a NULL pointer.
    
    Fix CID 1191978.
---
 src/lib/evas/canvas/evas_out.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c
index 5e877d1..4724529 100644
--- a/src/lib/evas/canvas/evas_out.c
+++ b/src/lib/evas/canvas/evas_out.c
@@ -59,14 +59,12 @@ _evas_out_destructor(Eo *eo_obj, Evas_Out_Data *eo_dat)
 
    eo_do(eo_obj, eo_parent_get(&eo_parent));
    e = eo_data_scope_get(eo_parent, EVAS_CLASS);
-   // XXX: need to free output and context one they get allocated one day   
+   if (!e) return ;
+   // XXX: need to free output and context one they get allocated one day
    // e->engine.func->context_free(eo_dat->output, eo_dat->context);
    // e->engine.func->output_free(eo_dat->output);
    e->engine.func->info_free(eo_parent, eo_dat->info);
-   if (e)
-     {
-        e->outputs = eina_list_remove(e->outputs, eo_obj);
-     }
+   e->outputs = eina_list_remove(e->outputs, eo_obj);
    eo_do_super(eo_obj, MY_CLASS, eo_destructor());
 }
 
@@ -106,4 +104,4 @@ _evas_out_engine_info_get(Eo *eo_e EINA_UNUSED, 
Evas_Out_Data *eo_dat)
    return eo_dat->info;
 }
 
-#include "canvas/evas_out.eo.c"
\ No newline at end of file
+#include "canvas/evas_out.eo.c"

-- 


Reply via email to