diff options
author | frosch <frosch@openttd.org> | 2013-10-31 20:31:10 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-10-31 20:31:10 +0000 |
commit | 2a16d139a29261144327b53022a0ccaf3907ee4e (patch) | |
tree | ac7f995fad0a2ceff6ab1325cd860d68e95c1972 /src/linkgraph | |
parent | 3a1fbc091ef755e427416453245591b780a3853c (diff) | |
download | openttd-2a16d139a29261144327b53022a0ccaf3907ee4e.tar.xz |
(svn r25934) -Fix [FS#5793]: Do not access items from other pools in pool item destructors during pool cleaning.
Diffstat (limited to 'src/linkgraph')
-rw-r--r-- | src/linkgraph/linkgraphjob.cpp | 4 |
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; |