Fix pure virtual function call (#3979)
This commit is contained in:
@@ -15,6 +15,12 @@ VectorMLTTile::VectorMLTTile(const OverscaledTileID& id_,
|
||||
TileObserver* observer_)
|
||||
: VectorTile(id_, std::move(sourceID_), parameters_, tileset_, observer_) {}
|
||||
|
||||
VectorMLTTile::~VectorMLTTile() {
|
||||
// Don't rely on `~TileLoader` to close, it's not safe to call there.
|
||||
// We're still calling a virtual method from a destructor, so any overrides will not be called.
|
||||
GeometryTile::cancel();
|
||||
}
|
||||
|
||||
void VectorMLTTile::setData(const std::shared_ptr<const std::string>& data_) {
|
||||
if (!obsolete) {
|
||||
GeometryTile::setData(data_ ? std::make_unique<VectorMLTTileData>(data_) : nullptr);
|
||||
|
||||
@@ -17,6 +17,8 @@ public:
|
||||
const Tileset&,
|
||||
TileObserver* observer = nullptr);
|
||||
|
||||
~VectorMLTTile() override;
|
||||
|
||||
void setData(const std::shared_ptr<const std::string>& data) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -15,6 +15,12 @@ VectorMVTTile::VectorMVTTile(const OverscaledTileID& id_,
|
||||
TileObserver* observer_)
|
||||
: VectorTile(id_, std::move(sourceID_), parameters_, tileset_, observer_) {}
|
||||
|
||||
VectorMVTTile::~VectorMVTTile() {
|
||||
// Don't rely on `~TileLoader` to close, it's not safe to call there.
|
||||
// We're still calling a virtual method from a destructor, so any overrides will not be called.
|
||||
GeometryTile::cancel();
|
||||
}
|
||||
|
||||
void VectorMVTTile::setData(const std::shared_ptr<const std::string>& data_) {
|
||||
if (!obsolete) {
|
||||
GeometryTile::setData(data_ ? std::make_unique<VectorMVTTileData>(data_) : nullptr);
|
||||
|
||||
@@ -17,6 +17,8 @@ public:
|
||||
const Tileset&,
|
||||
TileObserver* observer = nullptr);
|
||||
|
||||
~VectorMVTTile() override;
|
||||
|
||||
void setData(const std::shared_ptr<const std::string>& data) override;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user