diff --git a/source/eventcore/internal/dlist.d b/source/eventcore/internal/dlist.d index 5186fc8..8358e5d 100644 --- a/source/eventcore/internal/dlist.d +++ b/source/eventcore/internal/dlist.d @@ -59,6 +59,7 @@ struct StackDList(T) { void insertAfter(T* item, T* after) { + assert(!item.prev && !item.next); if (!after) insertBack(item); else { item.prev = after;