diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2019-10-30 10:18:15 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-11-03 04:02:00 -0800 |
commit | f1e7adfedcbbd7b39ea5763efaf30d61453e902c (patch) | |
tree | b0896006304ee38359f1272e26dfe1b4dd998f37 /mobile-widgets/qml/DiveList.qml | |
parent | 9f34f4f97d6b355dbb670da488e43c5e7f1cd9e7 (diff) | |
download | subsurface-f1e7adfedcbbd7b39ea5763efaf30d61453e902c.tar.gz |
Mobile: don't dereference the dive list model when it's disconnected
This avoids a bunch of annoying warnings.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/DiveList.qml')
-rw-r--r-- | mobile-widgets/qml/DiveList.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index 3172f71b7..a81f7cd23 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -361,7 +361,7 @@ Kirigami.ScrollablePage { } Controls.Label { text: { - diveListView.model.tripShortDate(section) + diveListView.model ? diveListView.model.tripShortDate(section) : "no data model" } color: subsurfaceTheme.primaryTextColor font.pointSize: subsurfaceTheme.smallPointSize @@ -386,7 +386,7 @@ Kirigami.ScrollablePage { Controls.Label { id: sectionText text: { - diveListView.model.tripTitle(section) + diveListView.model ? diveListView.model.tripTitle(section) : "no data model" } wrapMode: Text.WrapAtWordBoundaryOrAnywhere visible: text !== "" |