elm/code: check for cursor layout existence before emitting signals to it

Summary:
non-editable widgets do not have this object and will trigger errors

@fix
Depends on D8988

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8989
This commit is contained in:
Mike Blumenkrantz 2019-05-29 09:29:51 -04:00
parent 282c7672f6
commit ba3998544b
1 changed files with 2 additions and 1 deletions

View File

@ -713,7 +713,8 @@ _elm_code_widget_cursor_move(Elm_Code_Widget *widget, Elm_Code_Widget_Data *pd,
_elm_code_widget_refresh(widget, line_obj);
else
_elm_code_widget_fill_line(widget, pd, elm_code_file_line_get(pd->code->file, pd->cursor_line));
elm_layout_signal_emit(pd->cursor_rect, "elm,action,show,cursor", "elm");
if (pd->editable && pd->cursor_rect)
elm_layout_signal_emit(pd->cursor_rect, "elm,action,show,cursor", "elm");
}