diff options
author | mara <vmedea@protonmail.com> | 2023-01-25 08:55:42 +0000 |
---|---|---|
committer | mara <vmedea@protonmail.com> | 2023-01-25 10:00:25 +0100 |
commit | 655b32187f7ab34fe8acc708ef3b3fb18c82f08f (patch) | |
tree | 1dc52f87f2f0194d2dd86b6e93e070d36a545421 /editor/plugins/tiles | |
parent | 4368191a9f9c6290805dd4094c36379776128338 (diff) |
Fix: use the right tile_set in TilesEditorPlugin::_thread
Instead of using the class member, use the item's tile set, as is
the intent.
This fixes an almost immediate crash in the editor for me.
Diffstat (limited to 'editor/plugins/tiles')
-rw-r--r-- | editor/plugins/tiles/tiles_editor_plugin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/tiles/tiles_editor_plugin.cpp b/editor/plugins/tiles/tiles_editor_plugin.cpp index 19ee0ae98d..77dd0f7793 100644 --- a/editor/plugins/tiles/tiles_editor_plugin.cpp +++ b/editor/plugins/tiles/tiles_editor_plugin.cpp @@ -101,7 +101,7 @@ void TilesEditorPlugin::_thread() { encompassing_rect.expand_to(world_pos); // Texture. - Ref<TileSetAtlasSource> atlas_source = tile_set->get_source(tile_map->get_cell_source_id(0, cell)); + Ref<TileSetAtlasSource> atlas_source = item.tile_set->get_source(tile_map->get_cell_source_id(0, cell)); if (atlas_source.is_valid()) { Vector2i coords = tile_map->get_cell_atlas_coords(0, cell); int alternative = tile_map->get_cell_alternative_tile(0, cell); |