diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-09-24 10:33:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-24 10:33:21 +0200 |
commit | 55a36b7101a19cceb1386b397ab3158b94d7c970 (patch) | |
tree | 46cba61daea3a6361a021e28afbe2087e9cb3155 /editor | |
parent | 20c8a4752c1202f26a7f0b1f6a2fba66386549aa (diff) | |
parent | 3571087843d594b927c9c76cf12483371c6a7ca5 (diff) |
Merge pull request #11524 from marcelofg55/fix_bucket_infloop
Fix possible infinite loop with bucket fill tool
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/tile_map_editor_plugin.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool era return PoolVector<Vector2>(); } + if (id == prev_id) { + return PoolVector<Vector2>(); + } + Rect2i r = node->get_item_rect(); r.position = r.position / node->get_cell_size(); r.size = r.size / node->get_cell_size(); |