From: Wolfgang Bumiller Date: Sun, 1 Feb 2015 10:52:58 +0000 (+0100) Subject: destructor call order is important here X-Git-Tag: xonotic-v0.8.2~13 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d8e9b1b35d50a9e1ddfe6fa277f2b84e611ee41b;p=xonotic%2Fgmqcc.git destructor call order is important here --- diff --git a/ast.cpp b/ast.cpp index acf4928..58ed660 100644 --- a/ast.cpp +++ b/ast.cpp @@ -946,6 +946,10 @@ ast_function::~ast_function() ast_unref(m_fixedparams); if (m_return_value) ast_unref(m_return_value); + + // force this to be cleared before m_varargs/m_argc as blocks might + // try to access them via ast_unref() + m_blocks.clear(); } const char* ast_function::makeLabel(const char *prefix)