From c88be99d84aa0de63b77fcaa96c40b73ea10ae8c Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Mon, 17 Apr 2017 13:16:56 +0300 Subject: Fix a crash on exit Signed-off-by: Miika Turkia --- desktop-widgets/tableview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3-70-g09d2