aboutsummaryrefslogtreecommitdiff
path: root/sway/list.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/list.c')
-rw-r--r--sway/list.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/list.c b/sway/list.c
index 120cfbcd..82d6c144 100644
--- a/sway/list.c
+++ b/sway/list.c
@@ -12,6 +12,9 @@ list_t *create_list() {
}
void list_free(list_t *list) {
+ if (list == NULL) {
+ return;
+ }
free(list->items);
free(list);
}