summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-11-24 15:55:24 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-12-17 09:17:54 -0800
commit1f9fa8b462aeb2464ece272db5bfdbcd233355f3 (patch)
treea42cec1a8747e7b0da28faec05fdd9a42fe61a91
parent35ca8e4c66690c50dd45cf0842c95678da0ce899 (diff)
downloadsubsurface-1f9fa8b462aeb2464ece272db5bfdbcd233355f3.tar.gz
mobile: avoid warning in QML code
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--mobile-widgets/qml/TripDetails.qml3
1 files changed, 2 insertions, 1 deletions
diff --git a/mobile-widgets/qml/TripDetails.qml b/mobile-widgets/qml/TripDetails.qml
index d0fcd1a80..6750a9350 100644
--- a/mobile-widgets/qml/TripDetails.qml
+++ b/mobile-widgets/qml/TripDetails.qml
@@ -27,7 +27,8 @@ Kirigami.Page {
function resetState() {
// make sure we have the right width and reset focus / state if there aren't any unsaved changes
- width = parent.width
+ if (parent)
+ width = parent.width
if (tripLocation === tripLocationField.text && tripNotes === tripNotesField.text) {
tripLocationField.focus = false
tripNotesField.focus = false