]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix unzoning
authorMartin Taibr <taibr.martin@gmail.com>
Thu, 17 Nov 2016 21:34:35 +0000 (22:34 +0100)
committerMartin Taibr <taibr.martin@gmail.com>
Thu, 17 Nov 2016 21:34:35 +0000 (22:34 +0100)
qcsrc/common/mutators/mutator/damagetext/damagetext.qc

index cefdc9b030f7a66701fbec54a5a2b3bb2aa49894..900e42897396b54bb8275d231069f93ca31b0771 100644 (file)
@@ -117,6 +117,7 @@ CLASS(DamageText, Object)
                 ? sprintf("%d",      total)
                 : sprintf("%d (%d)", total, potential)
             ), s);
+        if (this.text) strunzone(this.text);
         this.text = strzone(s);
     }
 
@@ -129,7 +130,7 @@ CLASS(DamageText, Object)
     }
 
     DESTRUCTOR(DamageText) {
-        strunzone(this.text);
+        if (this.text) strunzone(this.text);
     }
 ENDCLASS(DamageText)
 #endif