Commit e5b7c874 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Handle foreach on empty lists

Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <>
parent b3ad3682
......@@ -379,7 +379,10 @@ girara_list_sort(girara_list_t* list, girara_compare_function_t compare)
girara_list_foreach(girara_list_t* list, girara_list_callback_t callback, void* data)
g_return_if_fail(list && list->start && callback);
g_return_if_fail(list != NULL && callback != NULL);
if (list->start == NULL) {
g_list_foreach(list->start, callback, data);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment