From 7445d9e0767e95a1be3396fd158e6ef0a2416f00 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 29 May 2022 08:54:06 +0300 Subject: Autocommit at 29.05.2022 @ 08:54 --- src/Models/Table.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/Models/Table.cpp') diff --git a/src/Models/Table.cpp b/src/Models/Table.cpp index 1a36bd0..edaccf7 100644 --- a/src/Models/Table.cpp +++ b/src/Models/Table.cpp @@ -44,9 +44,11 @@ void Table::putCell(unsigned row, unsigned col, const char* rawValue) { List Table::getAllCells() const { List toRet; - for (unsigned i = 0; i < cells.get_count(); i++) { - for (unsigned j = 0; j < cells[i].get_count(); j++) - toRet.add(cells[i][j]->getValueForPrint()); + for (unsigned i = 0; i < cells.get_length(); i++) { + for (unsigned j = 0; j < cells[i].get_length(); j++) + if (cells[i][j] == nullptr) + toRet.add(""); + else toRet.add(cells[i][j]->getValueForPrint()); } return toRet; } -- cgit v1.3.1-23-gd82d