From 1f9fa8b462aeb2464ece272db5bfdbcd233355f3 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 24 Nov 2020 15:55:24 -0800 Subject: mobile: avoid warning in QML code Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/TripDetails.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mobile-widgets') 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 -- cgit v1.2.3-70-g09d2