diff options
Autocommit at 29.05.2022 @ 09:09
1 files changed, 2 insertions, 0 deletions
| -rw-r--r-- | src/Models/Table.cpp | 2 |
diff --git a/src/Models/Table.cpp b/src/Models/Table.cpp index edaccf7..7e4a7ac 100644 --- a/src/Models/Table.cpp +++ b/src/Models/Table.cpp @@ -39,6 +39,8 @@ void Table::putCell(unsigned row, unsigned col, const char* rawValue) { ? (Cell*)new CellFormula(rawValue, &cells) : (Cell*)new CellString(rawValue); } + if (cells[row][col] != nullptr) + delete cells[row][col]; cells[row][col] = newCell; } |
