summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMilek7 <Milek7@users.noreply.github.com>2021-04-13 17:12:56 +0200
committerMichael Lutz <michi@icosahedron.de>2021-04-13 20:48:49 +0200
commit4cd9e0f41bb753545511b1672640911f228e67f1 (patch)
treeb0dfca103820c2347c95a471735928a5c4271dca /src
parent433602b072aaf6a2c07a9989e7989f2dd0bb8317 (diff)
downloadopenttd-4cd9e0f41bb753545511b1672640911f228e67f1.tar.xz
Fix: Add virtual destructor to link graph Path.
Classes derived from Path were freed through base class pointer, but no virtual destructor was present.
Diffstat (limited to 'src')
-rw-r--r--src/linkgraph/linkgraphjob.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/linkgraph/linkgraphjob.h b/src/linkgraph/linkgraphjob.h
index caeacd19d..4913b5a35 100644
--- a/src/linkgraph/linkgraphjob.h
+++ b/src/linkgraph/linkgraphjob.h
@@ -367,6 +367,7 @@ public:
static Path *invalid_path;
Path(NodeID n, bool source = false);
+ virtual ~Path() = default;
/** Get the node this leg passes. */
inline NodeID GetNode() const { return this->node; }