]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Prevent using bad strings. Fixes crash
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 30 Jan 2012 15:04:32 +0000 (17:04 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 30 Jan 2012 15:04:32 +0000 (17:04 +0200)
data/qcsrc/client/hud.qc

index 75ad88e211ca8b46883a8a49d412e7ed11536143..787a80ff929a56e698a68881501599aff56ce71d 100644 (file)
@@ -1708,6 +1708,7 @@ void Sbar_Portrait()
                return;\r
 \r
        if(portrait_time + cvar("sbar_portrait_time") >= time)\r
+       if(portrait_image && portrait_name) // prevent using bad strings\r
        {\r
                drawpic(left - '120 80 0' - fade_pos, portrait_image, '120 160 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                drawcolorcodedstring(left - '120 -80 0' - fade_pos, portrait_name, '12 12 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r