Fixed crash when re-opening image with auto wb in some situations
see issue 929
This commit is contained in:
@@ -358,6 +358,8 @@ int ProcParams::save (Glib::ustring fname, Glib::ustring fname2) const {
|
||||
keyFile.set_string ("White Balance", "Setting", "Camera");
|
||||
else
|
||||
keyFile.set_string ("White Balance", "Setting", "Custom");
|
||||
// not that "Auto" has been ruled out. It's just custom.
|
||||
|
||||
keyFile.set_integer ("White Balance", "Temperature", wb.temperature);
|
||||
keyFile.set_double ("White Balance", "Green", wb.green);
|
||||
|
||||
|
@@ -240,7 +240,7 @@ void WhiteBalance::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
if (method->get_active_row_number()==0)
|
||||
pp->wb.method = "Camera";
|
||||
else if (method->get_active_row_number()==1)
|
||||
pp->wb.method = "Auto";
|
||||
pp->wb.method = "Custom"; // "Auto"; // "Auto" is never saved to PP3/XMP. However when reopening images (from RAM) it can lead to crashes because the values are not available yet.
|
||||
else if (method->get_active_row_number()>=2)
|
||||
pp->wb.method = "Custom";
|
||||
|
||||
|
Reference in New Issue
Block a user