summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-04-17 15:11:26 +0200
committerStefan Schmidt <s.schmidt@samsung.com>2020-04-17 17:14:55 +0200
commit66adfc97f6ff8b03b813fa59207de410ec34d600 (patch)
tree3f123331c50d760eb2f79b2c9a9a8db61e74447e
parent38d74c8a1a88cf4563894ec06404ce0bfe717669 (diff)
exactness-inspect: fix NULL access
ii might be NULL so we should ensure it is not NULL to call item_select CID 1419865 Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11720
-rw-r--r--src/bin/exactness/inspect.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/bin/exactness/inspect.c b/src/bin/exactness/inspect.c
index 926f9810f5..115eab90cb 100644
--- a/src/bin/exactness/inspect.c
+++ b/src/bin/exactness/inspect.c
@@ -878,15 +878,19 @@ _comp_gl_selected_cb(void *data EINA_UNUSED, Evas_Object *gl EINA_UNUSED, void *
878 if (vv->p1) 878 if (vv->p1)
879 { 879 {
880 _Item_Info *ii = eina_hash_find(_item_infos_hash, &(vv->p1)); 880 _Item_Info *ii = eina_hash_find(_item_infos_hash, &(vv->p1));
881 if (!ii || !ii->gl_item) _obj_item_realize(vv->p1); 881 if (!ii || !ii->gl_item)
882 elm_genlist_item_selected_set(ii->gl_item, EINA_TRUE); 882 _obj_item_realize(vv->p1);
883 else
884 elm_genlist_item_selected_set(ii->gl_item, EINA_TRUE);
883 } 885 }
884 886
885 if (vv->p2) 887 if (vv->p2)
886 { 888 {
887 _Item_Info *ii = eina_hash_find(_item_infos_hash, &(vv->p2)); 889 _Item_Info *ii = eina_hash_find(_item_infos_hash, &(vv->p2));
888 if (!ii || !ii->gl_item) _obj_item_realize(vv->p2); 890 if (!ii || !ii->gl_item)
889 elm_genlist_item_selected_set(ii->gl_item, EINA_TRUE); 891 _obj_item_realize(vv->p2);
892 else
893 elm_genlist_item_selected_set(ii->gl_item, EINA_TRUE);
890 } 894 }
891} 895}
892 896