From 13bd6752f6652f40523f75bc66d7a40092b9ecf5 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 27 Nov 2016 20:07:02 +0100 Subject: [PATCH] pixelshift: Fixed a crash caused by division by zero when Show motion was enabled --- rtengine/pixelshift.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/pixelshift.cc b/rtengine/pixelshift.cc index 186dc8827..5483afdf3 100644 --- a/rtengine/pixelshift.cc +++ b/rtengine/pixelshift.cc @@ -51,7 +51,7 @@ float colourDiff(float a, float b, bool adaptive, float stddevFactor, float eper if(!showMotion) { return result; } else if(result > 0.f) { // for the motion mask - return std::fabs(a - b) / std::max(a, b) + 0.01f; + return std::fabs(a - b) / (std::max(a, b) + 0.01f); } else { return 0.f; }