From b6c386a3b03bfab2cd18c297cae59f2abe6b91a0 Mon Sep 17 00:00:00 2001 From: DualMatrix Date: Sat, 10 Nov 2018 18:52:52 +0100 Subject: [PATCH] Fixed error spam when deleting cell in tileset Fixes #23556 and should fix #21549 --- editor/plugins/tile_map_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index 635813f4b2b7..213cd2ce1a12 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -300,7 +300,7 @@ void TileMapEditor::_set_cell(const Point2i &p_pos, Vector p_values, bool p } node->set_cell(p_pos.x, p_pos.y, p_value, p_flip_h, p_flip_v, p_transpose); - if (manual_autotile || node->get_tileset()->tile_get_tile_mode(p_value) == TileSet::ATLAS_TILE) { + if (manual_autotile || (p_value != -1 && node->get_tileset()->tile_get_tile_mode(p_value) == TileSet::ATLAS_TILE)) { if (current != -1) { node->set_cell_autotile_coord(p_pos.x, p_pos.y, position); }