From b183a0b3c7e50d05ef0ff9bcaafb617178070b22 Mon Sep 17 00:00:00 2001 From: Hombre57 Date: Mon, 7 Aug 2017 21:05:00 +0200 Subject: [PATCH] Solving issue #4000 on behalf of heckflosse --- rtengine/rawimage.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index 7b6ee8782..f36e798d9 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -112,7 +112,7 @@ void RawImage::get_colorsCoeff( float *pre_mul_, float *scale_mul_, float *cblac } } - if ( this->get_cam_mul(0) == -1 || forceAutoWB) { + if (data && (this->get_cam_mul(0) == -1 || forceAutoWB)) { memset(dsum, 0, sizeof dsum); if (this->isBayer()) { @@ -552,7 +552,7 @@ int RawImage::loadRaw (bool loadData, unsigned int imageNum, bool closeFile, Pro crop_masked_pixels(); free (raw_image); raw_image = nullptr; - } else { + } else { if (get_maker() == "Sigma" && cc && cc->has_rawCrop()) { // foveon images int lm, tm, w, h; cc->get_rawCrop(lm, tm, w, h);