aboutsummaryrefslogtreecommitdiffstats
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
parentEfl.Ui.Slider: implement Efl.Ui.Progress.progress_min_max (diff)
downloadefl-867980520819a7c4bbc0fc70835d1e6823834941.tar.gz
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:
_evas_textblock_changed(o, eo_obj);
}
-//FIXME: add to legacy header
EAPI void
evas_textblock_cursor_paragraph_first(Efl_Canvas_Text_Cursor *cur)
{
+ if (!cur) return;
Evas_Object_Protected_Data *obj = efl_data_scope_get(cur->obj, EFL_CANVAS_OBJECT_CLASS);
evas_object_async_block(obj);
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
efl_event_callback_legacy_call(eo_obj, EFL_CANVAS_TEXT_EVENT_CURSOR_CHANGED, NULL);
}
-//FIXME: add to legacy header
EAPI void
evas_textblock_cursor_paragraph_last(Efl_Canvas_Text_Cursor *cur)
{
Evas_Object_Textblock_Node_Text *node;
+ if (!cur) return;
Evas_Object_Protected_Data *obj = efl_data_scope_get(cur->obj, EFL_CANVAS_OBJECT_CLASS);
evas_object_async_block(obj);
Efl_Canvas_Text_Data *o = efl_data_scope_get(cur->obj, MY_CLASS);