diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-03-18 14:20:40 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-03-18 17:05:45 -0700 |
commit | 9389fd004966d27db3a340940402067fa6aa6559 (patch) | |
tree | 1aa52874bb45a27ad83d9e74dde3023bbc823ef3 /mobile-widgets/qml/DiveDetails.qml | |
parent | 33df10cbaa5bd7eb84e54232351cd73739d0a248 (diff) | |
download | subsurface-9389fd004966d27db3a340940402067fa6aa6559.tar.gz |
QML UI: don't access members of undefined objects
If we don't have a currentItem, don't try to access its members.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/DiveDetails.qml')
-rw-r--r-- | mobile-widgets/qml/DiveDetails.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index 4f30ff6cb..096482c2d 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -49,7 +49,7 @@ Kirigami.Page { target: diveDetailsPage; actions { right: deleteAction - left: diveDetailsListView.currentItem.modelData.dive.gps !== "" ? mapAction : null + left: diveDetailsListView.currentItem ? (diveDetailsListView.currentItem.modelData.dive.gps !== "" ? mapAction : null) : null } } PropertyChanges { target: detailsEditScroll; opened: false } |