From bb8b5ad52f9cea9834cacdd36e774cbcb5232c96 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 8 Mar 2017 05:26:05 +1000 Subject: [PATCH] Don't try removing something from an intrusive list if it isn't in the list, fixes some potentially odd behaviour --- qcsrc/lib/intrusivelist.qh | 1 + 1 file changed, 1 insertion(+) diff --git a/qcsrc/lib/intrusivelist.qh b/qcsrc/lib/intrusivelist.qh index 9d3ec54c8..c83b2e69c 100644 --- a/qcsrc/lib/intrusivelist.qh +++ b/qcsrc/lib/intrusivelist.qh @@ -121,6 +121,7 @@ void IL_REMOVE(IntrusiveList this, entity it) assert(this, return); .entity il_next = this.il_nextfld; .entity il_prev = this.il_prevfld; + assert(!IL_CONTAINS(this, it), return); entity next = it.(il_next); entity prev = it.(il_prev); entity ohead = this.il_head; -- 2.39.2