Fix heap-use-after-free error in TileMap::~TileMap()

Co-authored-by: Gilles Roudiere <gilles.roudiere@gmail.com>
This commit is contained in:
Adam Scott 2022-12-11 13:21:10 -05:00
parent 05097ded0a
commit e7fb2f0294

View File

@ -4072,5 +4072,9 @@ TileMap::TileMap() {
}
TileMap::~TileMap() {
if (tile_set.is_valid()) {
tile_set->disconnect("changed", callable_mp(this, &TileMap::_tile_set_changed));
}
_clear_internals();
}