mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-19 07:20:50 +00:00
Fix a potential crash with the cvar reset command.
This commit is contained in:
parent
2ae33a753a
commit
e8e8dad535
1 changed files with 2 additions and 0 deletions
|
@ -697,6 +697,8 @@ Cvar_Get (const char *name, const char *string, int cvarflags,
|
||||||
|| strequal (var->description, USER_RO_CVAR)
|
|| strequal (var->description, USER_RO_CVAR)
|
||||||
|| strequal (var->description, USER_CVAR))
|
|| strequal (var->description, USER_CVAR))
|
||||||
var->description = description;
|
var->description = description;
|
||||||
|
if (!var->default_string)
|
||||||
|
var->default_string = strdup (string);
|
||||||
}
|
}
|
||||||
if (var->callback)
|
if (var->callback)
|
||||||
var->callback (var);
|
var->callback (var);
|
||||||
|
|
Loading…
Reference in a new issue