summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/tableview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/tableview.cpp b/desktop-widgets/tableview.cpp
index 0bb5bb198..d029c1808 100644
--- a/desktop-widgets/tableview.cpp
+++ b/desktop-widgets/tableview.cpp
@@ -67,7 +67,7 @@ TableView::~TableView()
s.beginGroup(objectName());
// remove the old default
bool oldDefault = (ui.tableView->columnWidth(0) == 30);
- for (int i = 1; oldDefault && i < ui.tableView->model()->columnCount(); i++) {
+ for (int i = 1; oldDefault && ui.tableView->model() && i < ui.tableView->model()->columnCount(); i++) {
if (ui.tableView->columnWidth(i) != 80)
oldDefault = false;
}