summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--list.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/list.c b/list.c
index ae102fc..269ce09 100644
--- a/list.c
+++ b/list.c
@@ -58,7 +58,7 @@ void *list_shift(struct list *list) {
struct list_node *node;
void *data;
- if (!list->first)
+ if (!list || !list->first)
return NULL;
node = list->first;