From e99f2d2cfa1e6f0c14a56b8fc6e5032d5440d4a5 Mon Sep 17 00:00:00 2001 From: raster Date: Fri, 29 Jul 2011 11:48:56 +0000 Subject: [PATCH] From: Jihoon Kim Subject: [E-devel] [PATCH] check NULL parameter in edje entry This simple patch is for checking NULL parameter in the callback functions related to input method framework. I think it is necessary for safety. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@61890 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/edje_entry.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/edje_entry.c b/src/lib/edje_entry.c index fcd7185..d7fa2e4 100644 --- a/src/lib/edje_entry.c +++ b/src/lib/edje_entry.c @@ -2694,7 +2694,7 @@ _edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event) Evas_Textblock_Cursor *tc; Eina_Bool cursor_move = EINA_FALSE; - if (!rp) return ECORE_CALLBACK_PASS_ON; + if ((!rp) || (!ev) || (!ev->str)) return ECORE_CALLBACK_PASS_ON; en = rp->entry_data; if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || @@ -2779,7 +2779,7 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, int type __UNUSED__, void * int i; Eina_Bool preedit_end_state = EINA_FALSE; - if (!rp) return ECORE_CALLBACK_PASS_ON; + if ((!rp) || (!ev)) return ECORE_CALLBACK_PASS_ON; en = rp->entry_data; if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || @@ -2873,7 +2873,7 @@ _edje_entry_imf_event_delete_surrounding_cb(void *data, int type __UNUSED__, voi Evas_Textblock_Cursor *del_start, *del_end; int cursor_pos; - if (!rp) return ECORE_CALLBACK_PASS_ON; + if ((!rp) || (!ev)) return ECORE_CALLBACK_PASS_ON; en = rp->entry_data; if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE)) -- 2.7.4