diff --git a/rtengine/ipdehaze.cc b/rtengine/ipdehaze.cc index 5522107e0..97c1883c9 100644 --- a/rtengine/ipdehaze.cc +++ b/rtengine/ipdehaze.cc @@ -183,6 +183,7 @@ float estimate_ambient_light(const array2D &R, const array2D &G, c } } } + n = std::max(n, 1); ambient[0] = rr / n; ambient[1] = gg / n; ambient[2] = bb / n; diff --git a/rtgui/labgrid.h b/rtgui/labgrid.h index 35e259996..30f6e76e5 100644 --- a/rtgui/labgrid.h +++ b/rtgui/labgrid.h @@ -66,7 +66,6 @@ private: sigc::connection delayconn; static const int inset = 2; - bool grid_visible; bool low_enabled; bool notifyListener();