Fixed crash issue 5945

This commit is contained in:
Desmis 2020-10-11 12:41:19 +02:00
parent 26f3b5a1ed
commit 8e92c13b28

View File

@ -1030,7 +1030,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
}
if (!exblurL && cp.contrast == 0.f && cp.blurres == 0.f && !cp.tonemap && !cp.finena && cp.conres == 0.f && cp.conresH == 0.f && cp.val == 0 && !ref0 && params->wavelet.CLmethod == "all") { // no processing of residual L or edge=> we probably can reduce the number of levels
if (!exblurL && cp.contrast == 0.f && cp.blurres == 0.f && !cp.tonemap && !cp.finena && !cp.edgeena && cp.conres == 0.f && cp.conresH == 0.f && cp.val == 0 && !ref0 && params->wavelet.CLmethod == "all") { // no processing of residual L or edge=> we probably can reduce the number of levels
while (levwavL > 0 && cp.mul[levwavL - 1] == 0.f) { // cp.mul[level] == 0.f means no changes to level
levwavL--;
}