zmike pushed a commit to branch efl-1.22.

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

commit ff1dfde419109ab7df611eb86dbc763a1c66949c
Author: Mike Blumenkrantz <[email protected]>
Date:   Wed May 29 09:23:12 2019 -0400

    efl_ui/button: check icon swallow existence before getting its content
    
    Summary:
    some button styles do not have this part
    
    @fix
    Depends on D8970
    
    Reviewers: devilhorns
    
    Reviewed By: devilhorns
    
    Subscribers: cedric, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D8971
---
 src/lib/elementary/efl_ui_button.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elementary/efl_ui_button.c 
b/src/lib/elementary/efl_ui_button.c
index a3c1c4dbfc..5e13b83787 100644
--- a/src/lib/elementary/efl_ui_button.c
+++ b/src/lib/elementary/efl_ui_button.c
@@ -430,6 +430,7 @@ _icon_signal_emit(Evas_Object *obj)
    char buf[64];
 
    if (!elm_widget_resize_object_get(obj)) return;
+   if (!edje_object_part_exists(obj, "elm.swallow.content")) return;
    snprintf(buf, sizeof(buf), "elm,state,icon,%s",
             elm_layout_content_get(obj, "icon") ? "visible" : "hidden");
 

-- 


Reply via email to