Commit 2118941e authored by Eike Hein's avatar Eike Hein

Merge branch 'fix_pos' into 'master'

main: Check if object is valid before accessing it

See merge request !6
parents c6d8a814 643fbeee
......@@ -183,7 +183,8 @@ Kirigami.ApplicationWindow {
return 0.0;
if (!currentVehicle.gpsPosition.isValid) {
// If currentVehicle is null or there is no valid position, set distance to zero
if (!currentVehicle || !currentVehicle.gpsPosition.isValid) {
return 0.0;
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