summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/clua.h
diff options
context:
space:
mode:
authorpauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-09 21:49:20 +0000
committerpauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-09 21:49:20 +0000
commit736d54113b3f4923892fd0060600e619dd29d9db (patch)
treed417427d8aafeab5621c0bdfc9f732e60b1749ac /crawl-ref/source/clua.h
parent5e2d8f305c41e9f2eec9b5a66804d1a03370a0b5 (diff)
downloadcrawl-ref-736d54113b3f4923892fd0060600e619dd29d9db.tar.gz
crawl-ref-736d54113b3f4923892fd0060600e619dd29d9db.zip
Fix crash on shutdown caused by bad order of static destruction (ugh).
crawl_environment's destructor uses dlua, but dlua was getting destroyed first. Rather than mess with stupidly complicated singleton patterns, I've moved the definition of clua and dlua into acr.cc, to just before crawl_environment. This makes the order of construction/destruction well-defined and should be a workable long-term solution. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3559 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/clua.h')
-rw-r--r--crawl-ref/source/clua.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/clua.h b/crawl-ref/source/clua.h
index 7608717e6a..51d827d183 100644
--- a/crawl-ref/source/clua.h
+++ b/crawl-ref/source/clua.h
@@ -183,6 +183,7 @@ private:
static std::string new_fn_name();
};
+// Defined in acr.cc
extern CLua clua;
void lua_set_exclusive_item(const item_def *item = NULL);