]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Check for null
authorTimePath <andrew.hardaker1995@gmail.com>
Tue, 22 Mar 2016 01:07:36 +0000 (12:07 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Tue, 22 Mar 2016 01:07:36 +0000 (12:07 +1100)
Closes #1702

qcsrc/server/weapons/weaponsystem.qc

index 1a2aaeafadc0bbc6b974be734fcaf9bd5884511b..7cf26a4593b4ea6d1b68a4531da0014475d41d41 100644 (file)
@@ -152,7 +152,8 @@ void CL_ExteriorWeaponentity_Think()
        else if (this.owner.alpha != 0) this.alpha = this.owner.alpha;
        else this.alpha = 1;
 
-       this.glowmod = weaponentity_glowmod(PS(this.owner).m_weapon, this.owner.clientcolors);
+    Weapon wep = PS(this.owner).m_weapon;
+       if (wep) this.glowmod = weaponentity_glowmod(wep, this.owner.clientcolors);
        this.colormap = this.owner.colormap;
 
        CSQCMODEL_AUTOUPDATE(this);