mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 08:41:59 +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)
|
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);
|
FName aname(name, true);
|
||||||
|
|
||||||
if (aname == NAME_None)
|
if (aname == NAME_None)
|
||||||
|
|
Loading…
Reference in a new issue