Crash in 'Highlight Reconstruction Colour Propagation', Issue 2360

This commit is contained in:
Ingo
2014-04-29 23:53:24 +02:00
parent c1cd47b907
commit 90db5e3e74

View File

@@ -675,6 +675,8 @@ void RawImageSource :: HLRecovery_inpaint (float** red, float** green, float** b
for (int c=1; c < ColorCount; c++)
sum[i2] += SQR(lab[i2][c]);
}
if(sum[0] == 0.f) // avoid division by zero
sum[0] = 0.0001f;
chratio = sqrt(sum[1]/sum[0]);