edje_entry: real part protection check

Fix T8524

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10875
This commit is contained in:
Ali Alzyod 2019-12-13 23:23:15 +00:00 committed by Cedric BAIL
parent 5892292ac8
commit c3dbcb2447
1 changed files with 3 additions and 0 deletions

View File

@ -4400,7 +4400,10 @@ Eina_Bool
_edje_text_cursor_coord_set(Edje_Real_Part *rp, Efl_Text_Cursor_Handle *c,
Evas_Coord x, Evas_Coord y)
{
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return EINA_FALSE;
Entry *en = rp->typedata.text->entry_data;
if (!en) return EINA_FALSE;
if ((c == _cursor_get(rp, EDJE_CURSOR_SELECTION_BEGIN)) ||
(c == _cursor_get(rp, EDJE_CURSOR_SELECTION_END)))
{