Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models / Table.cpp
diff options
context:
space:
mode:
1 files changed, 5 insertions, 3 deletions
-rw-r--r--src/Models/Table.cpp8
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<String> Table::getAllCells() const {
List<String> 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;
}