From 63156fc4614edbfe440e24e921e671774126bffe Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Tue, 2 May 2017 15:50:35 -0700 Subject: [PATCH] Fix crash --- src/FlightMap/Widgets/CenterMapDropButton.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FlightMap/Widgets/CenterMapDropButton.qml b/src/FlightMap/Widgets/CenterMapDropButton.qml index 8320fed2a..e4f410ade 100644 --- a/src/FlightMap/Widgets/CenterMapDropButton.qml +++ b/src/FlightMap/Widgets/CenterMapDropButton.qml @@ -200,11 +200,11 @@ DropButton { QGCButton { text: qsTr("Current Location") Layout.fillWidth: true - enabled: mainWindow.gcsPosition && mainWindow.gcsPosition.isValid && !followVehicleCheckBox.checked + enabled: map.gcsPosition ? map.gcsPosition.isValid && !followVehicleCheckBox.checked : false onClicked: { dropButton.hideDropDown() - map.center = mainWindow.gcsPosition + map.center = map.gcsPosition } } -- 2.22.0