diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index c639fafca..df803d951 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -5010,9 +5010,9 @@ void RawImageSource::getAutoWBMultipliers (double &rm, double &gm, double &bm) // return ColorTemp (pow(avg_r/rn, 1.0/6.0)*img_r, pow(avg_g/gn, 1.0/6.0)*img_g, pow(avg_b/bn, 1.0/6.0)*img_b); - double reds = avg_r / rn * refwb_red; - double greens = avg_g / gn * refwb_green; - double blues = avg_b / bn * refwb_blue; + double reds = avg_r / std::max(1, rn) * refwb_red; + double greens = avg_g / std::max(1, gn) * refwb_green; + double blues = avg_b / std::max(1, bn) * refwb_blue; redAWBMul = rm = imatrices.rgb_cam[0][0] * reds + imatrices.rgb_cam[0][1] * greens + imatrices.rgb_cam[0][2] * blues; greenAWBMul = gm = imatrices.rgb_cam[1][0] * reds + imatrices.rgb_cam[1][1] * greens + imatrices.rgb_cam[1][2] * blues; diff --git a/rtgui/batchqueuepanel.cc b/rtgui/batchqueuepanel.cc index 3a37996a0..fcccdf08a 100644 --- a/rtgui/batchqueuepanel.cc +++ b/rtgui/batchqueuepanel.cc @@ -41,7 +41,7 @@ static Glib::ustring makeFolderLabel(Glib::ustring path) return path; } -BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) +BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) : parent(nullptr) { batchQueue = Gtk::manage( new BatchQueue(aFileCatalog) ); diff --git a/rtgui/coordinateadjuster.cc b/rtgui/coordinateadjuster.cc index 3664902e9..23d4d79d7 100644 --- a/rtgui/coordinateadjuster.cc +++ b/rtgui/coordinateadjuster.cc @@ -40,7 +40,7 @@ void Axis::setValues(Glib::ustring label, unsigned int decimal, double increment this->rangeUpperBound = valMax; } -CoordinateAdjuster::AxisAdjuster::AxisAdjuster(CoordinateAdjuster *parent, const Axis *axis, char index) : idx(index), parent(parent) +CoordinateAdjuster::AxisAdjuster::AxisAdjuster(CoordinateAdjuster *parent, const Axis *axis, char index) : idx(index), parent(parent), rangeLowerBound(0.f), rangeUpperBound(0.f) { label = Gtk::manage( new Gtk::Label(axis->label) ); spinButton = Gtk::manage( new Gtk::SpinButton() ); diff --git a/rtgui/crop.cc b/rtgui/crop.cc index 429edf0ff..4b9e22fd2 100644 --- a/rtgui/crop.cc +++ b/rtgui/crop.cc @@ -54,7 +54,7 @@ int notifyListenerUI (void* data) } -Crop::Crop (): FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true) +Crop::Crop (): FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true), opt(0), wDirty(true), hDirty(true), xDirty(true), yDirty(true), lastFixRatio(true) { clistener = nullptr; diff --git a/rtgui/history.cc b/rtgui/history.cc index 11f8c63a0..8e7adfab7 100644 --- a/rtgui/history.cc +++ b/rtgui/history.cc @@ -26,7 +26,7 @@ using namespace rtengine::procparams; Glib::ustring eventDescrArray[NUMOFEVENTS]; -History::History (bool bookmarkSupport) : blistener(nullptr), tpc (nullptr), bmnum (1) +History::History (bool bookmarkSupport) : historyVPaned(nullptr), blistener(nullptr), tpc (nullptr), bmnum (1) { blistenerLock = false; // sets default that the Before preview will not be locked diff --git a/rtgui/imagearea.cc b/rtgui/imagearea.cc index 0842f4fb1..c0d334482 100644 --- a/rtgui/imagearea.cc +++ b/rtgui/imagearea.cc @@ -25,7 +25,7 @@ #include "../rtengine/refreshmap.h" #include "options.h" -ImageArea::ImageArea (ImageAreaPanel* p) : parent(p), firstOpen(true) +ImageArea::ImageArea (ImageAreaPanel* p) : parent(p), firstOpen(true), fullImageWidth(0), fullImageHeight(0) { infotext = ""; diff --git a/rtgui/mycurve.cc b/rtgui/mycurve.cc index dbb3eef5b..215eac429 100644 --- a/rtgui/mycurve.cc +++ b/rtgui/mycurve.cc @@ -21,7 +21,7 @@ #include #include -MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal(-1.f), listener(nullptr), cursor_type( CSArrow) +MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal(-1.f), listener(nullptr), cursor_type(CSArrow), graphW(0), graphH(0), mod_type(Gdk::MODIFIER_MASK), cursorX(0), cursorY(0), snapToMinDistX(0.0), snapToMinDistY(0.0), snapToValX(0.0), snapToValY(0.0) { graphX = get_allocation().get_width() - RADIUS * 2; diff --git a/rtgui/mydiagonalcurve.cc b/rtgui/mydiagonalcurve.cc index bf146b03d..7ee619036 100644 --- a/rtgui/mydiagonalcurve.cc +++ b/rtgui/mydiagonalcurve.cc @@ -21,7 +21,7 @@ #include #include -MyDiagonalCurve::MyDiagonalCurve () : activeParam(-1), bghistvalid(false) +MyDiagonalCurve::MyDiagonalCurve () : closest_point(0), clampedX(0.0), clampedY(0.0), deltaX(0.0), deltaY(0.0), distanceX(0.0), distanceY(0.0), ugpX(0.0), ugpY(0.0), activeParam(-1), bghistvalid(false) { graphW = get_allocation().get_width() - RADIUS * 2; diff --git a/rtgui/partialpastedlg.h b/rtgui/partialpastedlg.h index 438744863..8c0d4db5d 100644 --- a/rtgui/partialpastedlg.h +++ b/rtgui/partialpastedlg.h @@ -101,8 +101,6 @@ public: Gtk::CheckButton* raw_black; Gtk::CheckButton* raw_ca_autocorrect; Gtk::CheckButton* raw_caredblue; - Gtk::CheckButton* raw_cablue; - Gtk::CheckButton* raw_caautostrength; Gtk::CheckButton* raw_hotpix_filt; Gtk::CheckButton* raw_deadpix_filt; Gtk::CheckButton* raw_linenoise; diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index 54527a5d5..18bedf7b8 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -822,7 +822,7 @@ void Thumbnail::_loadThumbnail(bool firstTrial) tpp->init (); } - if (!initial_ && tpp) { + if (!initial_) { tw = tpp->getImageWidth (getProcParamsU(), th, imgRatio); // this might return 0 if image was just building } }