summaryrefslogtreecommitdiff
path: root/src/linkgraph/linkgraphjob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/linkgraph/linkgraphjob.cpp')
-rw-r--r--src/linkgraph/linkgraphjob.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/linkgraph/linkgraphjob.cpp b/src/linkgraph/linkgraphjob.cpp
index c66ddeac7..e23c23b47 100644
--- a/src/linkgraph/linkgraphjob.cpp
+++ b/src/linkgraph/linkgraphjob.cpp
@@ -38,7 +38,8 @@ LinkGraphJob::LinkGraphJob(const LinkGraph &orig) :
link_graph(orig),
settings(_settings_game.linkgraph),
join_date(_date + _settings_game.linkgraph.recalc_time),
- job_completed(false)
+ job_completed(false),
+ job_aborted(false)
{
}
@@ -92,6 +93,11 @@ LinkGraphJob::~LinkGraphJob()
* Accessing other pools may be invalid. */
if (CleaningPool()) return;
+ /* If the job has been aborted, the job state is invalid.
+ * This should never be reached, as once the job has been marked as aborted
+ * the only valid job operation is to clear the LinkGraphJob pool. */
+ assert(!this->IsJobAborted());
+
/* Link graph has been merged into another one. */
if (!LinkGraph::IsValidID(this->link_graph.index)) return;