summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@datenfreihafen.org>2012-12-17 14:12:49 +0000
committerStefan Schmidt <stefan@datenfreihafen.org>2012-12-17 14:12:49 +0000
commitc250d9c3aa83b9e137285c4012783315b65eb391 (patch)
tree5ea41eb7d27f90adbd793ec61e6d2f216c945059
parent1c27fc3827c3d964b7cea5b3bf9a98ba9b3a9cc9 (diff)
elm/toolbar: Fix NULL dereference waiting to happen.
The macro returns NULL if it->prev is not valid. So we better check if prev is not NULL before accessing it. SVN revision: 81144
-rw-r--r--src/lib/elm_toolbar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index f8f3fb36a..f30748cec 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -57,7 +57,7 @@ _items_visibility_fix(Elm_Toolbar_Smart_Data *sd,
57 if (it->separator) 57 if (it->separator)
58 { 58 {
59 prev = ELM_TOOLBAR_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev); 59 prev = ELM_TOOLBAR_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev);
60 it->prio.priority = prev->prio.priority; 60 if (prev) it->prio.priority = prev->prio.priority;
61 } 61 }
62 } 62 }
63 63