mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +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_CVAR))
|
||||
var->description = description;
|
||||
if (!var->default_string)
|
||||
var->default_string = strdup (string);
|
||||
}
|
||||
if (var->callback)
|
||||
var->callback (var);
|
||||
|
|
Loading…
Reference in a new issue