summaryrefslogtreecommitdiff
path: root/list.c
diff options
context:
space:
mode:
Diffstat (limited to 'list.c')
-rw-r--r--list.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/list.c b/list.c
index 4e80300..6aacfbd 100644
--- a/list.c
+++ b/list.c
@@ -88,7 +88,7 @@ void list_removedata(struct list *list, void *data) {
/* returns first node */
struct list_node *list_first(struct list *list) {
- return list->first;
+ return list ? list->first : NULL;
}
/* returns the next node after the argument */