From: Mario Date: Tue, 7 Mar 2017 19:26:05 +0000 (+1000) Subject: Don't try removing something from an intrusive list if it isn't in the list, fixes... X-Git-Tag: xonotic-v0.8.2~105 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bb8b5ad52f9cea9834cacdd36e774cbcb5232c96;p=xonotic%2Fxonotic-data.pk3dir.git Don't try removing something from an intrusive list if it isn't in the list, fixes some potentially odd behaviour --- 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;