From 3b7d18c129cba8ea9ab5b24b7d2147d01fd68306 Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Fri, 13 Jan 2017 11:39:52 +0100 Subject: [PATCH] - Fixed crash while exiting if compiled by GCC -O3. --- src/scripting/vm/vmframe.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scripting/vm/vmframe.cpp b/src/scripting/vm/vmframe.cpp index 08559445eb..09192cbfe1 100644 --- a/src/scripting/vm/vmframe.cpp +++ b/src/scripting/vm/vmframe.cpp @@ -272,6 +272,7 @@ VMFrameStack::~VMFrameStack() next = block->NextBlock; delete[] (VM_UBYTE *)block; } + Blocks = NULL; } if (UnusedBlocks != NULL) { @@ -281,9 +282,8 @@ VMFrameStack::~VMFrameStack() next = block->NextBlock; delete[] (VM_UBYTE *)block; } + UnusedBlocks = NULL; } - Blocks = NULL; - UnusedBlocks = NULL; } //=========================================================================== @@ -608,4 +608,4 @@ ADD_STAT(VM) VMCycles[0].Reset(); VMCalls[0] = 0; return FStringf("VM time in last 10 tics: %f ms, %d calls", added, addedc); -} \ No newline at end of file +}