From: TimePath Date: Tue, 17 Nov 2015 07:22:00 +0000 (+1100) Subject: ent_cs: fix strunzone crash X-Git-Tag: xonotic-v0.8.2~1653^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=899a2a12e4fc7270fdb5966d6ff6f9f7f02e4f75;p=xonotic%2Fxonotic-data.pk3dir.git ent_cs: fix strunzone crash --- diff --git a/qcsrc/common/ent_cs.qc b/qcsrc/common/ent_cs.qc index e016dd32d..3132ec323 100644 --- a/qcsrc/common/ent_cs.qc +++ b/qcsrc/common/ent_cs.qc @@ -134,7 +134,11 @@ this.has_origin = true; this.origin = e.origin; // `cl_forceplayermodels 1` sounds will be wrong until the player has been in the PVS, but so be it - this.model = e.model; + if (this.model != e.model) + { + if (this.model) strunzone(this.model); + this.model = strzone(e.model); + } } }