From e10abcad067b7786cabec0e723c7c61def64b6a1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 13 Sep 2016 10:43:53 +0200 Subject: [PATCH] - 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. --- src/name.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/name.cpp b/src/name.cpp index 8140829c6..ecedcf0f3 100644 --- a/src/name.cpp +++ b/src/name.cpp @@ -35,6 +35,7 @@ #include #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;