diff options
author | Shinwoo Kim <cinoo.kim@samsung.com> | 2018-08-20 16:19:02 +0900 |
---|---|---|
committer | Shinwoo Kim <cinoo.kim@samsung.com> | 2018-08-20 16:37:40 +0900 |
commit | 1c0f878fa6e02d930b3a88ad7281889cc15da145 (patch) | |
tree | 2fe920e7ba2ccd96dfc1118b3c3b1704ed6c781f | |
parent | febeaab9ce4ae9dc9f019973000973d31a27ae70 (diff) | |
download | efl-1c0f878fa6e02d930b3a88ad7281889cc15da145.tar.gz |
elm/win: check object class before using it
Summary:
elm_win_focus_get with non Efl.Ui.Win object could return incorrect value.
If an object implements Efl.Ui.Focus.Object.focus { get; } then the return
value of elm_win_focus_get with this object depends upon the object status.
Reviewers: Hermet, YOhoho
Reviewed By: YOhoho
Subscribers: cedric, #reviewers, #committers, zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6868
-rw-r--r-- | src/lib/elementary/efl_ui_win.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index df7094af13..29dce4dabb 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -8735,6 +8735,7 @@ elm_win_socket_listen(Efl_Ui_Win *obj, const char *svcname, int svcnum, Eina_Boo EAPI Eina_Bool elm_win_focus_get(const Efl_Ui_Win *obj) { + EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(obj, MY_CLASS), EINA_FALSE); return efl_ui_focus_object_focus_get(obj); } |