From 5395ba8ce5a76e01250eec949294674b381acf53 Mon Sep 17 00:00:00 2001 From: Ingo Date: Mon, 8 Dec 2014 02:08:04 +0100 Subject: [PATCH] segfault applying LCP to Image without focal length information, Issue 2598 --- rtengine/rawimagesource.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index f5e1a5cb2..947cdaff6 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1302,8 +1302,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le // Correct vignetting of lens profile if (!hasFlatField && lensProf.useVign) { LCPProfile *pLCPProf=lcpStore->getProfile(lensProf.lcpFile); - - if (pLCPProf) { + if (pLCPProf && (idata->getFocalLen() > 0.f || idata->getFocalLen35mm()> 0.f)) { LCPMapper map(pLCPProf, idata->getFocalLen(), idata->getFocalLen35mm(), idata->getFocusDist(), idata->getFNumber(), true, false, W, H, coarse, -1); #pragma omp parallel for