diff --git a/editor/scene/2d/tiles/tile_map_layer_editor.cpp b/editor/scene/2d/tiles/tile_map_layer_editor.cpp index 7e9bfc027f..e938cf5b27 100644 --- a/editor/scene/2d/tiles/tile_map_layer_editor.cpp +++ b/editor/scene/2d/tiles/tile_map_layer_editor.cpp @@ -2125,7 +2125,7 @@ void TileMapLayerEditorTilesPlugin::edit(ObjectID p_tile_map_layer_id) { } } - TileMapLayer *new_tile_map_layer = ObjectDB::get_instance(edited_tile_map_layer_id); + TileMapLayer *new_tile_map_layer = ObjectDB::get_instance(p_tile_map_layer_id); Ref new_tile_set; if (new_tile_map_layer) { new_tile_set = new_tile_map_layer->get_tile_set();