RawTherapee is crashing when trying to open .dng taken on smartphone, fixes #4047

This commit is contained in:
heckflosse
2017-08-28 17:40:05 +02:00
parent 0487fb8ec1
commit f3b4722e4f

View File

@@ -20,6 +20,8 @@
#define __RAWIMAGE_H
#include <ctime>
#include <cmath>
#include <iostream>
#include "dcraw.h"
#include "imageio.h"
@@ -233,7 +235,13 @@ public:
}
float get_pre_mul(int c )const
{
return pre_mul[c];
if(std::isfinite(pre_mul[c])) {
return pre_mul[c];
} else {
std::cout << "Failure decoding '" << filename << "', please file a bug report including the raw file and the line below:" << std::endl;
std::cout << "rawimage.h get_pre_mul() : pre_mul[" << c << "] value " << pre_mul[c] << " automatically replaced by value 1.0" << std::endl;
return 1.f;
}
}
float get_rgb_cam( int r, int c) const
{