From 8799b7b01eb163af8dfce0c6ee630e9345103b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Tue, 26 Sep 2017 15:42:23 +0200 Subject: [PATCH] Add assertion. --- source/eventcore/internal/dlist.d | 1 + 1 file changed, 1 insertion(+) 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;