From b7b5d48d2f2663593eb11f8561b6181180b56729 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Tue, 9 Feb 2021 12:38:39 +0100 Subject: [PATCH] Automatic distortion correction crashes on particular image, fixes #6104 --- rtengine/klt/trackFeatures.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/klt/trackFeatures.cc b/rtengine/klt/trackFeatures.cc index 8c0cd5ba6..b4f13c53c 100644 --- a/rtengine/klt/trackFeatures.cc +++ b/rtengine/klt/trackFeatures.cc @@ -460,7 +460,7 @@ static int _trackFeature( /* Check whether window is out of bounds */ if (*x2-hw < 0.0f || nc-(*x2+hw) < one_plus_eps || - *y2-hh < 0.0f || nr-(*y2+hh) < one_plus_eps) + *y2-hh < 0.0f || nr-(*y2+hh) < one_plus_eps || std::isnan(*x2) || std::isnan(*y2)) status = KLT_OOB; /* Check whether residue is too large */