forked from enlightenment/efl
one more safety check: do not remove element if it's not in any list.
This is the best we can do, but what should be done is to check if element is really from that list. SVN revision: 41326
This commit is contained in:
parent
26a3abe8ef
commit
9af4d08f79
|
@ -251,6 +251,8 @@ eina_inlist_remove(Eina_Inlist *list, Eina_Inlist *item)
|
|||
/* checkme */
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(list, NULL);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(item, list);
|
||||
EINA_SAFETY_ON_TRUE_RETURN_VAL
|
||||
((item != list) && (item->prev == NULL) && (item->next == NULL), list);
|
||||
|
||||
if (item->next)
|
||||
item->next->prev = item->prev;
|
||||
|
|
Loading…
Reference in New Issue