aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tableview.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2017-04-04 19:50:46 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-04-06 18:25:15 -0700
commit2f86cbdc3690aa0e5ef8e321f4d5dbb10bf640cc (patch)
tree2ce63eedcbb24566f248e8a4f01a63b316fa01fd /desktop-widgets/tableview.cpp
parent1fc4fba69fed8607d9b961086a88bcf362a482a5 (diff)
downloadsubsurface-2f86cbdc3690aa0e5ef8e321f4d5dbb10bf640cc.tar.gz
Clean up some widgets
Simplify logic of handling the Message that this dive is being modified. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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 3e9bb129e..0bb5bb198 100644
--- a/desktop-widgets/tableview.cpp
+++ b/desktop-widgets/tableview.cpp
@@ -73,7 +73,7 @@ TableView::~TableView()
}
if (oldDefault) {
s.remove("");
- } else {
+ } else if (ui.tableView->model()) {
for (int i = 0; i < ui.tableView->model()->columnCount(); i++) {
if (ui.tableView->columnWidth(i) == defaultColumnWidth(i))
s.remove(QString("colwidth%1").arg(i));