Replicate old mutator not added warning
authorMario <mario@smbclan.net>
Tue, 7 Mar 2017 19:19:35 +0000 (05:19 +1000)
committerMario <mario@smbclan.net>
Tue, 7 Mar 2017 19:19:35 +0000 (05:19 +1000)
qcsrc/common/mutators/base.qh

index 92e6323b3253e868bff39854337279af96dc4bac..7ef70f2c46b9db347c92f45b8d04444942531fca 100644 (file)
@@ -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)) {