From: Shinwoo Kim Date: Mon, 20 Aug 2018 07:19:02 +0000 (+0900) Subject: elm/win: check object class before using it X-Git-Tag: submit/sandbox/upgrade/efl120/20180919.042345~161 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc6511b0d51da338f5dbf5835a3af7e462e64bad;p=platform%2Fupstream%2Fefl.git 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 --- diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 27236ae..73791d4 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -10021,6 +10021,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); //TIZEN_ONLY(20180607): Restore legacy focus if (elm_widget_is_legacy(obj)) {