aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-09-16 17:19:49 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-09-16 17:28:31 +0200
commitb4976fdf2c236553cb8e024756a8bf53ce296629 (patch)
treec85558ba86e23222df5d45296b9e4708a8314933
parentdocs: Clarify event emission in Image.Gfx.Image_Load_Controller (diff)
downloadefl-b4976fdf2c236553cb8e024756a8bf53ce296629.tar.gz
efl_ui_*: fix dereferencing of possible NULL values
this fixes CID 1404763 & 1404751 & 1403904
-rw-r--r--src/lib/elementary/efl_ui_layout.c1
-rw-r--r--src/lib/elementary/efl_ui_radio_group_impl.c2
-rw-r--r--src/lib/elementary/efl_ui_tab_bar.c2
3 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index 5cd990e651..ed730a920f 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -1803,6 +1803,7 @@ _elm_layout_efl_canvas_group_change(Eo *obj, Elm_Layout_Data *ld)
if (!efl_finalized_get(obj)) return;
sd = efl_data_scope_safe_get(obj, EFL_UI_LAYOUT_BASE_CLASS);
+ EINA_SAFETY_ON_NULL_RETURN(sd);
if (sd->frozen) return;
ld->needs_size_calc = EINA_TRUE;
efl_canvas_group_change(efl_super(obj, ELM_LAYOUT_MIXIN));
diff --git a/src/lib/elementary/efl_ui_radio_group_impl.c b/src/lib/elementary/efl_ui_radio_group_impl.c
index 622924bcdc..6c20f96d00 100644
--- a/src/lib/elementary/efl_ui_radio_group_impl.c
+++ b/src/lib/elementary/efl_ui_radio_group_impl.c
@@ -65,6 +65,8 @@ static void
_selected_cb(void *data, const Efl_Event *ev)
{
Efl_Ui_Radio_Group_Impl_Data *pd = efl_data_scope_safe_get(data, EFL_UI_RADIO_GROUP_IMPL_CLASS);
+ EINA_SAFETY_ON_NULL_RETURN(pd);
+
if (efl_ui_selectable_selected_get(ev->object))
{
if (pd->selected)
diff --git a/src/lib/elementary/efl_ui_tab_bar.c b/src/lib/elementary/efl_ui_tab_bar.c
index 05e32cadd1..db7c169653 100644
--- a/src/lib/elementary/efl_ui_tab_bar.c
+++ b/src/lib/elementary/efl_ui_tab_bar.c
@@ -39,6 +39,8 @@ _selelction_change_cb(void *data, const Efl_Event *ev)
{
Efl_Ui_Tab_Bar_Data *pd = efl_data_scope_safe_get(data, MY_CLASS);
+ EINA_SAFETY_ON_NULL_RETURN(pd);
+
if (!efl_ui_selectable_selected_get(ev->object))
{
if (pd->selected == ev->object)