Merge pull request #69922 from adamscott/fix-tilemap-tileset-heap-use-after-free

Fix `heap-use-after-free` error in `TileMap::~TileMap()`
This commit is contained in:
Rémi Verschelde 2022-12-12 11:41:49 +01:00
commit 52a0bba833
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

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