From 3571087843d594b927c9c76cf12483371c6a7ca5 Mon Sep 17 00:00:00 2001 From: Marcelo Fernandez Date: Sat, 23 Sep 2017 23:30:00 -0300 Subject: Fix possible infinite loop with bucket fill tool --- editor/plugins/tile_map_editor_plugin.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index b85ffd6c67..328d07d7a8 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -351,6 +351,10 @@ PoolVector TileMapEditor::_bucket_fill(const Point2i &p_start, bool era return PoolVector(); } + if (id == prev_id) { + return PoolVector(); + } + Rect2i r = node->get_item_rect(); r.position = r.position / node->get_cell_size(); r.size = r.size / node->get_cell_size(); -- cgit v1.2.3