mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-30 15:41:47 +00:00
Merge remote-tracking branch 'remotes/zdoom/master'
This commit is contained in:
commit
0c0e716ccd
2 changed files with 11 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)
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "name.h"
|
#include "name.h"
|
||||||
#include "c_dispatch.h"
|
#include "c_dispatch.h"
|
||||||
|
#include "c_console.h"
|
||||||
|
|
||||||
// MACROS ------------------------------------------------------------------
|
// MACROS ------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -268,6 +269,8 @@ FName::NameManager::~NameManager()
|
||||||
{
|
{
|
||||||
NameBlock *block, *next;
|
NameBlock *block, *next;
|
||||||
|
|
||||||
|
C_ClearTabCommands();
|
||||||
|
|
||||||
for (block = Blocks; block != NULL; block = next)
|
for (block = Blocks; block != NULL; block = next)
|
||||||
{
|
{
|
||||||
next = block->NextBlock;
|
next = block->NextBlock;
|
||||||
|
|
Loading…
Reference in a new issue