From 9b79fbeb7ea43f8d9eefe94993b81558f051616c Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Thu, 2 Aug 2018 14:41:26 -0700 Subject: [PATCH] Fix failure handling --- src/MissionManager/VisualMissionItem.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/MissionManager/VisualMissionItem.cc b/src/MissionManager/VisualMissionItem.cc index 70ccdbc5b..0370a0653 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(); } -- 2.22.0