Website Summary Files Commits Branches @commit @diff @stats
path: root / src / UserInterface / UserInterface.cpp
diff options
context:
space:
mode:
1 files changed, 5 insertions, 0 deletions
-rw-r--r--src/UserInterface/UserInterface.cpp5
diff --git a/src/UserInterface/UserInterface.cpp b/src/UserInterface/UserInterface.cpp
index f64b1f2..6352381 100644
--- a/src/UserInterface/UserInterface.cpp
+++ b/src/UserInterface/UserInterface.cpp
@@ -73,6 +73,11 @@ void UserInterface::com_exit(const char* params) {
}
void UserInterface::com_print(const char* params) {
+ if (table == nullptr) {
+ printLine("You need to open a file!");
+ return;
+ }
+
List<String> cells = table->getAllCells();
printTable(cells, table->get_cols());
}