]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/base.qh
Replicate old mutator not added warning
[xonotic/xonotic-data.pk3dir.git] / 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)) {