Checking whether previous item is NULL and if it is then returning false. 07/120907/1
authorPawel <p.aksiutowic@partner.samsung.com>
Fri, 24 Mar 2017 14:59:51 +0000 (15:59 +0100)
committerPawel <p.aksiutowic@partner.samsung.com>
Fri, 24 Mar 2017 14:59:51 +0000 (15:59 +0100)
Change-Id: I4dfb3f5d98fdc7b8fdd6d990189ef312b7234471
Signed-off-by: Pawel <p.aksiutowic@partner.samsung.com>
src/layout/layout_sound.c

index 85188f2..ca9869e 100644 (file)
@@ -323,6 +323,12 @@ static bool _select_item(Elm_Object_Item *it, struct _priv *priv,
                item_info->selected = true;
                if (prev_it) {
                        item_info = (struct sound_item_s *)elm_object_item_data_get(prev_it);
+                       if(!item_info)
+                       {
+                               _ERR("Cannot unselect prev item");
+                               return false;
+                       }
+
                        item_info->selected = false;
                }