edc_editor: fix a potential error.

Terminate redoundo instance after edc editor private resources are removed.
Redoundo has a entry delete callback, and it frees the redoundo private memory there.

But, if a redoundo instance is removed before entry delete callback is called,
invalid memory access will be happened.

Acutally this's broken memory.

So prevent this scenario by correcting function call order.

@fix
This commit is contained in:
Hermet Park 2016-08-04 19:10:21 +09:00
parent 4b693973b0
commit c5f59c63b8
1 changed files with 2 additions and 1 deletions

View File

@ -1532,8 +1532,8 @@ edit_term(edit_data *ed)
syntax_helper *sh = ed->sh;
parser_data *pd = ed->pd;
redoundo_data *rd = ed->rd;
redoundo_term(ed->rd);
ecore_thread_cancel(ed->syntax_color_thread);
ecore_timer_del(ed->syntax_color_timer);
evas_object_del(ed->scroller);
@ -1541,6 +1541,7 @@ edit_term(edit_data *ed)
free(ed);
redoundo_term(rd);
syntax_term(sh);
parser_term(pd);
}