forked from enlightenment/efl
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:
parent
272f32ee9f
commit
894c7af10a
|
@ -4984,8 +4984,8 @@ _elm_entry_file_text_format_set(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd, Elm_Tex
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
elm_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format)
|
elm_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format)
|
||||||
{
|
{
|
||||||
Eina_Bool ret;
|
Eina_Bool ret = EINA_FALSE;
|
||||||
ELM_ENTRY_DATA_GET(obj, sd);
|
ELM_ENTRY_DATA_GET_OR_RETURN_VAL(obj, sd, ret);
|
||||||
ELM_SAFE_FREE(sd->delay_write, ecore_timer_del);
|
ELM_SAFE_FREE(sd->delay_write, ecore_timer_del);
|
||||||
if (sd->auto_save) _save_do(obj);
|
if (sd->auto_save) _save_do(obj);
|
||||||
elm_obj_entry_file_text_format_set(obj, format);
|
elm_obj_entry_file_text_format_set(obj, format);
|
||||||
|
|
Loading…
Reference in New Issue