diff --git a/events.c b/events.c index 81fe063..e2a0ca4 100644 --- a/events.c +++ b/events.c @@ -1,3 +1,5 @@ +#include +#include #include "events.h" EventNode @@ -49,6 +51,10 @@ event_create(const EventData * content) list_pos = &other->next->prev; } EventNode * prev = *list_pos; + if (!prev) { + fprintf(stderr, "*list_pos is NULL\n"); + abort(); + } event->next = prev->next; event->prev = prev; prev->next->prev = event;