summaryrefslogtreecommitdiff
path: root/src/deque.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/deque.c')
-rw-r--r--src/deque.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/deque.c b/src/deque.c
index 3ff7dc9..bc39e0e 100644
--- a/src/deque.c
+++ b/src/deque.c
@@ -122,6 +122,8 @@ EXPORT_SYMBOL void *HXdeque_del(struct HXdeque_node *node)
EXPORT_SYMBOL void HXdeque_free(struct HXdeque *dq)
{
+ if (dq == NULL)
+ return;
struct HXdeque_node *node, *next;
for (node = dq->first; node != NULL; node = next) {
next = node->next;