diff options
author | Adam Borowski <kilobyte@angband.pl> | 2010-09-11 02:39:01 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2010-09-11 02:45:28 +0200 |
commit | 58291d7c4525385bc37aea0f4c5cfaa3dec04a22 (patch) | |
tree | 5b2495d7720d9d5c27efe0bc0a56504615f864a1 /crawl-ref/source/package.cc | |
parent | 8adcbc1eb54671b0b145022a3c5a2312bebf1400 (diff) | |
download | crawl-ref-58291d7c4525385bc37aea0f4c5cfaa3dec04a22.tar.gz crawl-ref-58291d7c4525385bc37aea0f4c5cfaa3dec04a22.zip |
Skip an assertion when crashing down.
Diffstat (limited to 'crawl-ref/source/package.cc')
-rw-r--r-- | crawl-ref/source/package.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/package.cc b/crawl-ref/source/package.cc index fd5816269b..56f5686e0b 100644 --- a/crawl-ref/source/package.cc +++ b/crawl-ref/source/package.cc @@ -154,7 +154,11 @@ package::package(const char* file, bool writeable, bool empty) package::~package() { dprintf("package: finalizing\n"); - ASSERT(!n_users); + ASSERT(!n_users || CrawlIsCrashing); // not merely aborted, there are + // live pointers to us. With normal stack unwinding, destructors + // will make sure this never happens and this assert is good for + // catching missing manual deletes. The C++ exit handler is the + // only place that can be legitimately call things in wrong order. if (rw && !aborted) { |