summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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