Segfault when curve black point is moved below white point, fixes #2923

This commit is contained in:
heckflosse
2015-10-06 22:29:44 +02:00
parent 20839d3a4a
commit 9dc786f0ea
2 changed files with 6 additions and 2 deletions

View File

@@ -72,7 +72,11 @@ DiagonalCurve::DiagonalCurve (const std::vector<double>& p, int poly_pn)
if(x[0] == 0.f && x[1] == 0.f)
// Avoid crash when first two points are at x = 0 (git Issue 2888)
x[1] = 0.5f;
x[1] = 0.01f;
if(x[0] == 1.f && x[1] == 1.f)
// Avoid crash when first two points are at x = 1 (100 in gui) (git Issue 2923)
x[0] = 0.99f;
if (!identity) {
if (kind == DCT_Spline && N > 2) {

View File

@@ -983,7 +983,7 @@ SSEFUNCTION int RawImageSource::findHotDeadPixels( PixelsMap &bpMap, float thres
// process borders. Former version calculated the median using mirrored border which does not make sense because the original pixel loses weight
// Setting the difference between pixel and median for border pixels to zero should do the job not worse then former version
#ifdef _OPENMP
#pragma omp critical
#pragma omp single
#endif
{
for(int i = 0; i < 2; i++) {