aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-08-07 18:21:27 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-08-07 18:21:27 -0300
commitbc0a2c2be29c4c69fe13599068fe5b9aa3d67eb7 (patch)
tree69ef5c74a715dc7ca0f89edc54ce874000a92ee5
parentelementary: Fix child_add events from model (diff)
downloadefl-bc0a2c2be29c4c69fe13599068fe5b9aa3d67eb7.tar.gz
elementary: Fix efl_ui_list_example_3 when deleting with no selection made
-rw-r--r--src/examples/elementary/efl_ui_list_example_3.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/examples/elementary/efl_ui_list_example_3.c b/src/examples/elementary/efl_ui_list_example_3.c
index c6f0e8ed8d..ff36b09c5c 100644
--- a/src/examples/elementary/efl_ui_list_example_3.c
+++ b/src/examples/elementary/efl_ui_list_example_3.c
@@ -83,8 +83,15 @@ _bt_del_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
l = elm_interface_atspi_selection_selected_child_get(priv->list1, 0);
printf("selection %p\n", l);
- child = efl_ui_view_model_get(l);
- efl_model_child_del(priv->model, child);
+ if(l)
+ {
+ child = efl_ui_view_model_get(l);
+ efl_model_child_del(priv->model, child);
+ }
+ else
+ {
+ printf("no selection\n");
+ }
}
static void