Commit 13ca238f authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #5080 from DonLakeFlyer/CenterMapCrash

Fix crash
parents 2c3a43b0 63156fc4
...@@ -200,11 +200,11 @@ DropButton { ...@@ -200,11 +200,11 @@ DropButton {
QGCButton { QGCButton {
text: qsTr("Current Location") text: qsTr("Current Location")
Layout.fillWidth: true Layout.fillWidth: true
enabled: mainWindow.gcsPosition && mainWindow.gcsPosition.isValid && !followVehicleCheckBox.checked enabled: map.gcsPosition ? map.gcsPosition.isValid && !followVehicleCheckBox.checked : false
onClicked: { onClicked: {
dropButton.hideDropDown() dropButton.hideDropDown()
map.center = mainWindow.gcsPosition map.center = map.gcsPosition
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment