mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +00:00
Fix segfault when setting forceskin to None
This commit is contained in:
parent
ce1901a3bb
commit
1718361123
1 changed files with 3 additions and 4 deletions
|
@ -2065,10 +2065,9 @@ static void CV_SetValueMaybeStealth(consvar_t *var, INT32 value, boolean stealth
|
|||
if (var == &cv_forceskin) // Special handling.
|
||||
{
|
||||
const char *tmpskin = NULL;
|
||||
if ((value < 0) || (value >= numskins))
|
||||
;
|
||||
else
|
||||
if (value >= 0 && value < numskins)
|
||||
tmpskin = skins[value]->name;
|
||||
if (tmpskin)
|
||||
memcpy(val, tmpskin, SKINNAMESIZE);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue