From: Mario Date: Tue, 7 Mar 2017 19:19:35 +0000 (+1000) Subject: Replicate old mutator not added warning X-Git-Tag: xonotic-v0.8.2~27^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f5e29b71f2147dd0d87f4b96f074d4db05ac1034;p=xonotic%2Fxonotic-data.pk3dir.git Replicate old mutator not added warning --- diff --git a/qcsrc/common/mutators/base.qh b/qcsrc/common/mutators/base.qh index 92e6323b3..7ef70f2c4 100644 --- a/qcsrc/common/mutators/base.qh +++ b/qcsrc/common/mutators/base.qh @@ -234,6 +234,12 @@ bool Mutator_Add(Mutator mut) void Mutator_Remove(Mutator mut) { + if(!mut.m_added) + { + backtrace("WARNING: removing not-added mutator\n"); + return; + } + mut.m_added = false; mutatorfunc_t func = mut.mutatorfunc; if (func(MUTATOR_REMOVING)) {