ecore/evas: add NULL checks to handle argument is NULL.

Summary:
ecore_pipe_read_fd/ecore_pipe_write_fd
evas_engine_info_set/get

Reviewers: woohyun, Jaehyun, Jaehyun_Cho, jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5790
This commit is contained in:
Hosang Kim 2018-02-06 17:58:44 +09:00 committed by Jean-Philippe Andre
parent 1accec4ce1
commit 24b0ae0df5
2 changed files with 6 additions and 0 deletions

View File

@ -140,6 +140,7 @@ EAPI int
ecore_pipe_read_fd(Ecore_Pipe *p)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(PIPE_FD_INVALID);
if (!p) return PIPE_FD_INVALID;
return p->fd_read;
}
@ -201,6 +202,7 @@ EAPI int
ecore_pipe_write_fd(Ecore_Pipe *p)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(PIPE_FD_INVALID);
if (!p) return PIPE_FD_INVALID;
return p->fd_write;
}

View File

@ -468,6 +468,8 @@ next_zombie:
EAPI Evas_Engine_Info *
evas_engine_info_get(const Evas *obj)
{
if (!obj) return NULL;
Evas_Public_Data *e = efl_data_scope_get(obj, EVAS_CANVAS_CLASS);
Efl_Canvas_Output *output;
@ -485,6 +487,8 @@ evas_engine_info_get(const Evas *obj)
EAPI Eina_Bool
evas_engine_info_set(Evas *obj, Evas_Engine_Info *info)
{
if (!obj) return EINA_FALSE;
Evas_Public_Data *e = efl_data_scope_get(obj, EVAS_CANVAS_CLASS);
Efl_Canvas_Output *output;