1
0
mirror of https://gitlab.xiph.org/xiph/icecast-common.git synced 2024-12-04 14:46:31 -05:00

Fix: Handle an iterator of NULL correctly

This commit is contained in:
Philipp Schafft 2018-11-14 16:00:05 +00:00
parent d5d1956f52
commit a75e064256

View File

@ -289,6 +289,9 @@ igloo_ro_t igloo_list_iterator_next(igloo_list_iterator_t *iterator
{ {
size_t physical; size_t physical;
if (!iterator)
return igloo_RO_NULL;
physical = iterator->idx + iterator->list->offset; physical = iterator->idx + iterator->list->offset;
if (physical >= iterator->list->fill) if (physical >= iterator->list->fill)