Browse Source

Merge pull request #69365 from timothyqiu/invalid-reference

Fix heap-use-after-free when changing alternative tile ID
Rémi Verschelde 2 years ago
parent
commit
e51d69dda0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      editor/plugins/tiles/tile_set_atlas_source_editor.cpp

+ 1 - 1
editor/plugins/tiles/tile_set_atlas_source_editor.cpp

@@ -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) {