stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=02ad4d18ba86c9160a6e75829a6ec16a9d79ef7c

commit 02ad4d18ba86c9160a6e75829a6ec16a9d79ef7c
Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Apr 22 13:13:57 2020 -0400

    elm/list: avoid erroring on non-elm item contents
    
    putting raw evas and edje objects in here has historically been done,
    so handle it without errors
    
    Reviewed-by: Stefan Schmidt <[email protected]>
    Differential Revision: https://phab.enlightenment.org/D11747
---
 src/lib/elementary/elm_list.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c
index 7414bd2559..4447ea2f05 100644
--- a/src/lib/elementary/elm_list.c
+++ b/src/lib/elementary/elm_list.c
@@ -2328,8 +2328,11 @@ _item_new(Evas_Object *obj,
         evas_object_event_callback_add
           (it->icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb,
           obj);
-        efl_access_object_access_type_set(it->icon, EFL_ACCESS_TYPE_DISABLED);
-        elm_widget_tree_unfocusable_set(it->icon, EINA_TRUE);
+        if (elm_widget_is(it->icon))
+          {
+             efl_access_object_access_type_set(it->icon, 
EFL_ACCESS_TYPE_DISABLED);
+             elm_widget_tree_unfocusable_set(it->icon, EINA_TRUE);
+          }
      }
    if (it->end)
      {
@@ -2337,8 +2340,11 @@ _item_new(Evas_Object *obj,
         evas_object_event_callback_add
           (it->end, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb,
           obj);
-        efl_access_object_access_type_set(it->end, EFL_ACCESS_TYPE_DISABLED);
-        elm_widget_tree_unfocusable_set(it->end, EINA_TRUE);
+        if (elm_widget_is(it->end))
+          {
+             efl_access_object_access_type_set(it->end, 
EFL_ACCESS_TYPE_DISABLED);
+             elm_widget_tree_unfocusable_set(it->end, EINA_TRUE);
+          }
      }
 
    if (_elm_config->atspi_mode)

-- 


Reply via email to