From: Shinwoo Kim Date: Mon, 16 Oct 2017 06:58:56 +0000 (+0900) Subject: atspi: not use destructed eo object X-Git-Tag: accepted/tizen/4.0/unified/20171023.120327~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F55%2F155855%2F2;p=platform%2Fupstream%2Felementary.git atspi: not use destructed eo object It is possible to access destructed eo object using ATSPI interface. The following sequence is possilbe, because AT-client such as screen-reader does not know whether a widget object deleted or not. 1. _elm_radio_evas_object_smart_del 2. _elm_radio_elm_interface_atspi_accessible_state_set_get So before using eo interface, we have to check if the eo object is vlid or not using eo_destructed_is. Change-Id: I7ffaf7bd905dcc2ef5770d9c1cef9de52ec77322 --- diff --git a/src/lib/elm_atspi_bridge.c b/src/lib/elm_atspi_bridge.c index 00ab38e..ef2674b 100644 --- a/src/lib/elm_atspi_bridge.c +++ b/src/lib/elm_atspi_bridge.c @@ -62,14 +62,14 @@ static Eina_Hash *read_command_id = NULL; if (!sd) return val; #define ELM_ATSPI_PROPERTY_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, class, msg, error) \ - if (!(obj) || !eo_isa(obj, class)) \ + if (!(obj) || !eo_isa(obj, class) || eo_destructed_is(obj)) \ { \ *(error) = _dbus_invalid_ref_error_new(msg); \ return EINA_FALSE; \ } #define ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, class, msg) \ - if (!(obj) || !eo_isa(obj, class)) \ + if (!(obj) || !eo_isa(obj, class) || eo_destructed_is(obj)) \ return _dbus_invalid_ref_error_new(msg); typedef struct Key_Event_Info {