summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tableview.cpp
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2017-04-17 13:16:56 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-04-18 18:12:04 -0700
commitc88be99d84aa0de63b77fcaa96c40b73ea10ae8c (patch)
treee89b14ef49ca99b9d372317093f962876c7c45d3 /desktop-widgets/tableview.cpp
parent972819d77afdbfc38af384bb38123671dc522e54 (diff)
downloadsubsurface-c88be99d84aa0de63b77fcaa96c40b73ea10ae8c.tar.gz
Fix a crash on exit
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'desktop-widgets/tableview.cpp')
-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;
}