浏览代码

Fix heap-use-after-free when changing alternative tile ID

Haoyu Qiu 2 年之前
父节点
当前提交
6c5c773a27
共有 1 个文件被更改,包括 1 次插入1 次删除
  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) {