forked from enlightenment/efl
The for loop inside _edje_file_del is accessing Edje_Real_Part that could be
destroyed by _edje_cache_coll_unref. So moving the call to _edje_cache_coll_unref after the last use of Edje_Real_Part should be better. SVN revision: 38020
This commit is contained in:
parent
94aaa28ef9
commit
2c668d6747
|
@ -717,20 +717,6 @@ _edje_file_del(Edje *ed)
|
|||
_edje_programs_patterns_clean(ed);
|
||||
|
||||
if (!((ed->file) && (ed->collection))) return;
|
||||
if ((ed->file) && (ed->collection))
|
||||
{
|
||||
Eina_List *l;
|
||||
Edje_Part *ep;
|
||||
|
||||
_edje_textblock_styles_del(ed);
|
||||
EINA_LIST_FOREACH(ed->collection->parts, l, ep)
|
||||
{
|
||||
_edje_text_part_on_del(ed, ep);
|
||||
_edje_color_class_on_del(ed, ep);
|
||||
}
|
||||
_edje_cache_coll_unref(ed->file, ed->collection);
|
||||
ed->collection = NULL;
|
||||
}
|
||||
if (ed->table_parts)
|
||||
{
|
||||
int i;
|
||||
|
@ -787,6 +773,20 @@ _edje_file_del(Edje *ed)
|
|||
free(rp);
|
||||
}
|
||||
}
|
||||
if ((ed->file) && (ed->collection))
|
||||
{
|
||||
Eina_List *l;
|
||||
Edje_Part *ep;
|
||||
|
||||
_edje_textblock_styles_del(ed);
|
||||
EINA_LIST_FOREACH(ed->collection->parts, l, ep)
|
||||
{
|
||||
_edje_text_part_on_del(ed, ep);
|
||||
_edje_color_class_on_del(ed, ep);
|
||||
}
|
||||
_edje_cache_coll_unref(ed->file, ed->collection);
|
||||
ed->collection = NULL;
|
||||
}
|
||||
if (ed->file)
|
||||
{
|
||||
_edje_cache_file_unref(ed->file);
|
||||
|
|
Loading…
Reference in New Issue