diff --git a/src/MissionManager/VisualMissionItem.cc b/src/MissionManager/VisualMissionItem.cc index 70ccdbc5bce8b2957fba0ab34e63d03cfdb61967..0370a065335c6cfd6d84bec26961ad3f06e88132 100644 --- a/src/MissionManager/VisualMissionItem.cc +++ b/src/MissionManager/VisualMissionItem.cc @@ -195,9 +195,7 @@ void VisualMissionItem::_reallyUpdateTerrainAltitude(void) void VisualMissionItem::_terrainDataReceived(bool success, QList heights) { - if (success) { - _terrainAltitude = heights[0]; - emit terrainAltitudeChanged(_terrainAltitude); - sender()->deleteLater(); - } + _terrainAltitude = success ? heights[0] : qQNaN(); + emit terrainAltitudeChanged(_terrainAltitude); + sender()->deleteLater(); }