summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-10-31 20:31:10 +0000
committerfrosch <frosch@openttd.org>2013-10-31 20:31:10 +0000
commit2a16d139a29261144327b53022a0ccaf3907ee4e (patch)
treeac7f995fad0a2ceff6ab1325cd860d68e95c1972
parent3a1fbc091ef755e427416453245591b780a3853c (diff)
downloadopenttd-2a16d139a29261144327b53022a0ccaf3907ee4e.tar.xz
(svn r25934) -Fix [FS#5793]: Do not access items from other pools in pool item destructors during pool cleaning.
-rw-r--r--src/linkgraph/linkgraphjob.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/linkgraph/linkgraphjob.cpp b/src/linkgraph/linkgraphjob.cpp
index ac22a38a4..b6c1747a2 100644
--- a/src/linkgraph/linkgraphjob.cpp
+++ b/src/linkgraph/linkgraphjob.cpp
@@ -41,6 +41,10 @@ LinkGraphJob::~LinkGraphJob()
{
assert(this->thread == NULL);
+ /* Don't update stuff from other pools, when everything is being removed.
+ * Accessing other pools may be invalid. */
+ if (CleaningPool()) return;
+
/* Link graph has been merged into another one. */
if (!LinkGraph::IsValidID(this->link_graph.index)) return;