瀏覽代碼

Tilemap editor: Fix crash introduced in #17582

Max Hilbrunner 7 年之前
父節點
當前提交
81fd48eb1e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      editor/plugins/tile_map_editor_plugin.cpp

+ 1 - 1
editor/plugins/tile_map_editor_plugin.cpp

@@ -526,7 +526,7 @@ PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool era
 	if (!erase) {
 		ids = get_selected_tiles();
 
-		if (ids.size() == 0 && ids[0] == TileMap::INVALID_CELL)
+		if (ids.size() == 0 || ids[0] == TileMap::INVALID_CELL)
 			return PoolVector<Vector2>();
 	} else if (prev_id == TileMap::INVALID_CELL) {
 		return PoolVector<Vector2>();