From: Cedric BAIL Date: Fri, 14 Mar 2014 02:51:49 +0000 (+0900) Subject: evas: if the class is the wrong one, you should not do the check after accessing... X-Git-Tag: v1.9.0+464+gcaabcbe~124 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b0a4bf28086b72a5b1860cbfbf82e8e9670d1d2a;p=platform%2Fupstream%2Fefl.git evas: if the class is the wrong one, you should not do the check after accessing a NULL pointer. Fix CID 1191978. --- diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c index 5e877d16a4..4724529d41 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"