forked from enlightenment/efl
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:
parent
1accec4ce1
commit
24b0ae0df5
|
@ -140,6 +140,7 @@ EAPI int
|
||||||
ecore_pipe_read_fd(Ecore_Pipe *p)
|
ecore_pipe_read_fd(Ecore_Pipe *p)
|
||||||
{
|
{
|
||||||
EINA_MAIN_LOOP_CHECK_RETURN_VAL(PIPE_FD_INVALID);
|
EINA_MAIN_LOOP_CHECK_RETURN_VAL(PIPE_FD_INVALID);
|
||||||
|
if (!p) return PIPE_FD_INVALID;
|
||||||
return p->fd_read;
|
return p->fd_read;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,6 +202,7 @@ EAPI int
|
||||||
ecore_pipe_write_fd(Ecore_Pipe *p)
|
ecore_pipe_write_fd(Ecore_Pipe *p)
|
||||||
{
|
{
|
||||||
EINA_MAIN_LOOP_CHECK_RETURN_VAL(PIPE_FD_INVALID);
|
EINA_MAIN_LOOP_CHECK_RETURN_VAL(PIPE_FD_INVALID);
|
||||||
|
if (!p) return PIPE_FD_INVALID;
|
||||||
return p->fd_write;
|
return p->fd_write;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -468,6 +468,8 @@ next_zombie:
|
||||||
EAPI Evas_Engine_Info *
|
EAPI Evas_Engine_Info *
|
||||||
evas_engine_info_get(const Evas *obj)
|
evas_engine_info_get(const Evas *obj)
|
||||||
{
|
{
|
||||||
|
if (!obj) return NULL;
|
||||||
|
|
||||||
Evas_Public_Data *e = efl_data_scope_get(obj, EVAS_CANVAS_CLASS);
|
Evas_Public_Data *e = efl_data_scope_get(obj, EVAS_CANVAS_CLASS);
|
||||||
Efl_Canvas_Output *output;
|
Efl_Canvas_Output *output;
|
||||||
|
|
||||||
|
@ -485,6 +487,8 @@ evas_engine_info_get(const Evas *obj)
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
evas_engine_info_set(Evas *obj, Evas_Engine_Info *info)
|
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);
|
Evas_Public_Data *e = efl_data_scope_get(obj, EVAS_CANVAS_CLASS);
|
||||||
Efl_Canvas_Output *output;
|
Efl_Canvas_Output *output;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue