- 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:
Christoph Oelckers 2016-09-13 21:01:50 +02:00
parent e10abcad06
commit ba68cfd611

View file

@ -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)