forked from enlightenment/efl
Eina_List: Avoid Segfault
Some inputs in which tmp - cur is greater than the number of previous nodes in list, were causing ct to be null at end of loop. Patch by Jonas M. Gastal <jgastal@profusion.mobi> SVN revision: 52253
This commit is contained in:
parent
47b00392a7
commit
2216c53641
|
@ -1859,6 +1859,9 @@ eina_list_search_sorted_near_list(const Eina_List *list,
|
|||
else if (tmp > cur)
|
||||
for (; tmp != cur; tmp--, ct = ct->prev) ;
|
||||
|
||||
if (!ct)
|
||||
goto end;
|
||||
|
||||
cmp = func(ct->data, data);
|
||||
if (cmp == 0)
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue