- 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:
Christoph Oelckers 2016-09-13 10:43:53 +02:00
parent 823f75e592
commit e10abcad06

View file

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