elm_entry: prevent from accessing null pointer

Summary: change ELM_ENTRY_DATA_GET to ELM_ENTRY_DATA_GET_OR_RETURN_VAL

Test Plan: elm_entry_file_set(NULL, ~~~);

Reviewers: YOhoho, Hermet, woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8544
This commit is contained in:
junsu choi 2019-04-03 13:58:35 +09:00 committed by WooHyun Jung
parent 272f32ee9f
commit 894c7af10a
1 changed files with 2 additions and 2 deletions

View File

@ -4984,8 +4984,8 @@ _elm_entry_file_text_format_set(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd, Elm_Tex
EAPI Eina_Bool
elm_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format)
{
Eina_Bool ret;
ELM_ENTRY_DATA_GET(obj, sd);
Eina_Bool ret = EINA_FALSE;
ELM_ENTRY_DATA_GET_OR_RETURN_VAL(obj, sd, ret);
ELM_SAFE_FREE(sd->delay_write, ecore_timer_del);
if (sd->auto_save) _save_do(obj);
elm_obj_entry_file_text_format_set(obj, format);