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:
commit
52a0bba833
1 changed files with 4 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue