Merge pull request #69365 from timothyqiu/invalid-reference

Fix heap-use-after-free when changing alternative tile ID
This commit is contained in:
Rémi Verschelde 2022-11-30 10:48:48 +01:00
commit e51d69dda0
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -152,7 +152,7 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na
// ID and size related properties.
if (tiles.size() == 1) {
const Vector2i &coords = tiles.front()->get().tile;
const Vector2i coords = tiles.front()->get().tile;
const int &alternative = tiles.front()->get().alternative;
if (alternative == 0) {