From 90d200a10ba4d8c2ae2eff47ad8e1cca0ab28e76 Mon Sep 17 00:00:00 2001 From: xuri Date: Wed, 7 Jul 2021 00:57:43 +0800 Subject: Make the functions `SetSheetRow`, `New Style` and `SetCellStyle` concurrency safety --- sheet.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sheet.go') diff --git a/sheet.go b/sheet.go index 3a55540..8d3d457 100644 --- a/sheet.go +++ b/sheet.go @@ -1777,6 +1777,8 @@ func fillColumns(rowData *xlsxRow, col, row int) { // makeContiguousColumns make columns in specific rows as contiguous. func makeContiguousColumns(ws *xlsxWorksheet, fromRow, toRow, colCount int) { + ws.Lock() + defer ws.Unlock() for ; fromRow < toRow; fromRow++ { rowData := &ws.SheetData.Row[fromRow-1] fillColumns(rowData, colCount, fromRow) -- cgit v1.2.1