forked from enlightenment/efl
efl_ui_win: add validation check to return legacy default value
Summary: elm_win_type_get needs to return ELM_WIN_UNKNOWN when invalid object comes. Reviewers: zmike, bu5hm4n, segfaultxavi Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10187
This commit is contained in:
parent
8197fee189
commit
ddb28ccdf1
|
@ -9392,6 +9392,10 @@ elm_win_name_get(const Evas_Object *obj)
|
||||||
EAPI Elm_Win_Type
|
EAPI Elm_Win_Type
|
||||||
elm_win_type_get(const Evas_Object *obj)
|
elm_win_type_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
if (!(efl_isa(obj, EFL_UI_WIN_CLASS) ||
|
||||||
|
efl_isa(obj, EFL_UI_WIN_LEGACY_CLASS) ||
|
||||||
|
efl_isa(obj, EFL_UI_WIN_INLINED_CLASS))) return ELM_WIN_UNKNOWN;
|
||||||
|
|
||||||
return _efl_ui_win_type_to_elm_win_type(efl_ui_win_type_get(obj));
|
return _efl_ui_win_type_to_elm_win_type(efl_ui_win_type_get(obj));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue