summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hirt <hirt.danny@gmail.com>2017-06-13 14:48:50 +0300
committerDaniel Hirt <hirt.danny@gmail.com>2017-06-13 16:11:54 +0300
commit867980520819a7c4bbc0fc70835d1e6823834941 (patch)
treeaa33e696dbabaf565d6eb550d98a281787f605e8
parentb279387843575881825543bef34f50b36f3ab3f0 (diff)
Canvas text cursor: add NULL checks for some functions
Passing a NULL cursor is permitted. Forgot to add to two functions during port from EO. Fixes some crashes.
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 99b0343d99..6476c48b02 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -8550,10 +8550,10 @@ found:
8550 _evas_textblock_changed(o, eo_obj); 8550 _evas_textblock_changed(o, eo_obj);
8551} 8551}
8552 8552
8553//FIXME: add to legacy header
8554EAPI void 8553EAPI void
8555evas_textblock_cursor_paragraph_first(Efl_Canvas_Text_Cursor *cur) 8554evas_textblock_cursor_paragraph_first(Efl_Canvas_Text_Cursor *cur)
8556{ 8555{
8556 if (!cur) return;
8557 Evas_Object_Protected_Data *obj = efl_data_scope_get(cur->obj, EFL_CANVAS_OBJECT_CLASS); 8557 Evas_Object_Protected_Data *obj = efl_data_scope_get(cur->obj, EFL_CANVAS_OBJECT_CLASS);
8558 evas_object_async_block(obj); 8558 evas_object_async_block(obj);
8559 Efl_Canvas_Text_Data *o = efl_data_scope_get(cur->obj, MY_CLASS); 8559 Efl_Canvas_Text_Data *o = efl_data_scope_get(cur->obj, MY_CLASS);
@@ -8568,12 +8568,12 @@ _efl_canvas_text_efl_text_cursor_cursor_paragraph_first(Eo *eo_obj, Efl_Canvas_T
8568 efl_event_callback_legacy_call(eo_obj, EFL_CANVAS_TEXT_EVENT_CURSOR_CHANGED, NULL); 8568 efl_event_callback_legacy_call(eo_obj, EFL_CANVAS_TEXT_EVENT_CURSOR_CHANGED, NULL);
8569} 8569}
8570 8570
8571//FIXME: add to legacy header
8572EAPI void 8571EAPI void
8573evas_textblock_cursor_paragraph_last(Efl_Canvas_Text_Cursor *cur) 8572evas_textblock_cursor_paragraph_last(Efl_Canvas_Text_Cursor *cur)
8574{ 8573{
8575 Evas_Object_Textblock_Node_Text *node; 8574 Evas_Object_Textblock_Node_Text *node;
8576 8575
8576 if (!cur) return;
8577 Evas_Object_Protected_Data *obj = efl_data_scope_get(cur->obj, EFL_CANVAS_OBJECT_CLASS); 8577 Evas_Object_Protected_Data *obj = efl_data_scope_get(cur->obj, EFL_CANVAS_OBJECT_CLASS);
8578 evas_object_async_block(obj); 8578 evas_object_async_block(obj);
8579 Efl_Canvas_Text_Data *o = efl_data_scope_get(cur->obj, MY_CLASS); 8579 Efl_Canvas_Text_Data *o = efl_data_scope_get(cur->obj, MY_CLASS);