mirror of https://github.com/OpenTTD/OpenTTD
Fix: Add virtual destructor to link graph Path.
Classes derived from Path were freed through base class pointer, but no virtual destructor was present.pull/9160/head
parent
40f7d085f4
commit
144ed59aef
|
@ -367,6 +367,7 @@ public:
|
||||||
static Path *invalid_path;
|
static Path *invalid_path;
|
||||||
|
|
||||||
Path(NodeID n, bool source = false);
|
Path(NodeID n, bool source = false);
|
||||||
|
virtual ~Path() = default;
|
||||||
|
|
||||||
/** Get the node this leg passes. */
|
/** Get the node this leg passes. */
|
||||||
inline NodeID GetNode() const { return this->node; }
|
inline NodeID GetNode() const { return this->node; }
|
||||||
|
|
Loading…
Reference in New Issue