ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/tools/edi.git/commit/?id=04d86d3250a2dec411b995653604ca832545093c
commit 04d86d3250a2dec411b995653604ca832545093c Author: Andy Williams <[email protected]> Date: Wed Dec 21 21:35:40 2016 +0000 don't crash on invalid lines --- src/bin/editor/edi_editor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c index 0a33dba..10b798c 100644 --- a/src/bin/editor/edi_editor.c +++ b/src/bin/editor/edi_editor.c @@ -89,6 +89,9 @@ _edi_editor_current_word_get(Edi_Editor *editor, unsigned int row, unsigned int code = elm_code_widget_code_get(editor->entry); line = elm_code_file_line_get(code->file, row); + if (!line) + return strdup(""); + curtext = (char *)elm_code_line_text_get(line, &curlen); ptr = curtext + col - 1; --
