diff --git a/libpkgconf/iter.h b/libpkgconf/iter.h index 6aa28e5..59cfac3 100644 --- a/libpkgconf/iter.h +++ b/libpkgconf/iter.h @@ -61,7 +61,7 @@ pkgconf_node_insert_tail(pkgconf_node_t *node, void *data, pkgconf_list_t *list) node->data = data; - if (list->head == NULL) + if (list->tail == NULL) { list->head = node; list->tail = node;