From 95da12212beb6ab947de5ebbb0d12ffba3d2006c Mon Sep 17 00:00:00 2001 From: Andreas Haas Date: Thu, 3 Aug 2017 20:44:15 +0200 Subject: TileMap: Fix infinite loop when trying to bucket-delete empty tiles. Right-clicking when the bucket tool is enabled means "erase all instances of this tile". So it doesn't make sense to try doing this for empty tiles :P Fixes #10065 --- editor/plugins/tile_map_editor_plugin.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index d12b979121..e7bc8a4dab 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -330,6 +330,8 @@ PoolVector TileMapEditor::_bucket_fill(const Point2i &p_start, bool era if (id == TileMap::INVALID_CELL) return PoolVector(); + } else if (prev_id == TileMap::INVALID_CELL) { + return PoolVector(); } Rect2i r = node->get_item_rect(); -- cgit v1.2.3