mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- fixed: The TabCommands array needs to be cleared before the NameManager is destroyed.
TabCommands use an FName to store the command's name so once the NameManager is destroyed its data will become invalid. This is a problem because C_RemoveTabCommand is being called from FBaseCVar's destructor and most CVARs are global variables.
This commit is contained in:
parent
823f75e592
commit
e10abcad06
1 changed files with 3 additions and 0 deletions
|
@ -35,6 +35,7 @@
|
|||
#include <string.h>
|
||||
#include "name.h"
|
||||
#include "c_dispatch.h"
|
||||
#include "c_console.h"
|
||||
|
||||
// MACROS ------------------------------------------------------------------
|
||||
|
||||
|
@ -268,6 +269,8 @@ FName::NameManager::~NameManager()
|
|||
{
|
||||
NameBlock *block, *next;
|
||||
|
||||
C_ClearTabCommands();
|
||||
|
||||
for (block = Blocks; block != NULL; block = next)
|
||||
{
|
||||
next = block->NextBlock;
|
||||
|
|
Loading…
Reference in a new issue