Commit b90be2fe authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

forgot to also add a range check here.

2003-11-01  Sven Neumann  <sven@gimp.org>

	* app/base/gimphistogram.c (gimp_histogram_get_mean): forgot to
	also add a range check here.

	* app/widgets/gimphistogrameditor.c: update the channel menu when
	the image mode changes or an alpha channel is added/removed.
parent 6c5f31b9
2003-11-01 Sven Neumann <sven@gimp.org>
* app/base/gimphistogram.c (gimp_histogram_get_mean): forgot to
also add a range check here.
* app/widgets/gimphistogrameditor.c: update the channel menu when
the image mode changes or an alpha channel is added/removed.
2003-11-01 Sven Neumann <sven@gimp.org>
Replaced the histogram tool by a histogram dialog:
......@@ -6,7 +14,7 @@
* themes/Default/images/tools/stock-tool-histogram-[16|22].png:
removed here ...
* themes/Default/images/stock-histogram-[16|22].png: ,,, and added
* themes/Default/images/stock-histogram-[16|22].png: ... and added
under these new names.
* libgimpwidgets/gimpstock.[ch]: register the icons as
......@@ -10,9 +10,12 @@ GIMP version 2.0.
Overview of Changes in GIMP 1.3.22
==================================
- Replaced histogram tool with a histogram dialog [Sven]
- Multi-head safety [Sven]
- Changes for future compatibility of text layers [Sven]
- Histogram scale configurable for all tools and defaults to linear [Sven]
- Better default settings
- Complete configurability of normal and fullscreen view [Sven, Bolsh]
- Completed configurability of normal and fullscreen view [Sven, Bolsh]
- GimpConfig cleanups and improvements [Mitch, Sven]
- Allow to configure the default grid in your gimprc [Brix]
- Improved session handling; store more settings like the position of
......
......@@ -253,7 +253,7 @@ gimp_histogram_get_mean (GimpHistogram *histogram,
g_return_val_if_fail (histogram != NULL, 0.0);
if (! histogram->values)
if (! histogram->values || channel >= histogram->n_channels)
return 0.0;
for (i = start; i <= end; i++)
......@@ -341,7 +341,7 @@ gimp_histogram_alloc_values (GimpHistogram *histogram,
histogram->values = g_new0 (gdouble *, histogram->n_channels);
for (i = 0; i < histogram->n_channels; i++)
histogram->values[i] = g_new (double, 256);
histogram->values[i] = g_new (gdouble, 256);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment