mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
- do not even allow creation of names in C_RemoveTabCommands if there are no tab commands, so that FindName cannot be called after the NameManager has been destroyed.
This commit is contained in:
parent
e10abcad06
commit
ba68cfd611
1 changed files with 8 additions and 0 deletions
|
@ -1747,6 +1747,14 @@ void C_AddTabCommand (const char *name)
|
|||
|
||||
void C_RemoveTabCommand (const char *name)
|
||||
{
|
||||
if (TabCommands.Size() == 0)
|
||||
{
|
||||
// There are no tab commands that can be removed.
|
||||
// This is important to skip construction of aname
|
||||
// in case the NameManager has already been destroyed.
|
||||
return;
|
||||
}
|
||||
|
||||
FName aname(name, true);
|
||||
|
||||
if (aname == NAME_None)
|
||||
|
|
Loading…
Reference in a new issue