editor: Fix crash opening empty files

This commit is contained in:
Andy Williams 2015-06-10 23:32:15 +01:00
parent 8d17e2710f
commit 4af0936331
1 changed files with 3 additions and 0 deletions

View File

@ -70,6 +70,9 @@ _elm_code_widget_line_text_column_width_to_position(Eo *obj, Elm_Code_Widget_Dat
static unsigned int
_elm_code_widget_line_text_column_width_get(Eo *obj, Elm_Code_Widget_Data *pd, Elm_Code_Line *line)
{
if (!line)
return 0;
return _elm_code_widget_line_text_column_width_to_position(obj, pd, line, line->length) - 1;
}