diff --git a/ApplicationCode/UserInterface/RiuSummaryQwtPlot.cpp b/ApplicationCode/UserInterface/RiuSummaryQwtPlot.cpp index 0d36902df6..3b6b74e7d0 100644 --- a/ApplicationCode/UserInterface/RiuSummaryQwtPlot.cpp +++ b/ApplicationCode/UserInterface/RiuSummaryQwtPlot.cpp @@ -214,7 +214,7 @@ void RiuSummaryQwtPlot::selectClosestCurve(const QPoint& pos) if((*it)->rtti() == QwtPlotItem::Rtti_PlotCurve) { QwtPlotCurve* candidateCurve = static_cast(*it); - double dist; + double dist = DBL_MAX; candidateCurve->closestPoint(pos, &dist); if(dist < distMin) { diff --git a/ApplicationCode/UserInterface/RiuWellLogTrack.cpp b/ApplicationCode/UserInterface/RiuWellLogTrack.cpp index 148c6248ce..3ee541590e 100644 --- a/ApplicationCode/UserInterface/RiuWellLogTrack.cpp +++ b/ApplicationCode/UserInterface/RiuWellLogTrack.cpp @@ -240,7 +240,7 @@ void RiuWellLogTrack::selectClosestCurve(const QPoint& pos) if ((*it )->rtti() == QwtPlotItem::Rtti_PlotCurve ) { QwtPlotCurve* candidateCurve = static_cast(*it); - double dist; + double dist = DBL_MAX; candidateCurve->closestPoint(pos, &dist); if (dist < distMin) {