Commit 873dec37 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

don't crash on empty palettes.

2005-07-15  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpviewrendererpalette.c
	(gimp_view_renderer_palette_render): don't crash on empty palettes.
parent 8d856ef5
2005-07-15 Sven Neumann <sven@gimp.org>
* app/widgets/gimpviewrendererpalette.c
(gimp_view_renderer_palette_render): don't crash on empty palettes.
2005-07-14 Michael Natterer <mitch@gimp.org>
* app/widgets/gimphistogramview.c
......
......@@ -137,7 +137,7 @@ gimp_view_renderer_palette_render (GimpViewRenderer *renderer,
renderpal->columns = renderer->width / renderpal->cell_width;
renderpal->rows = palette->n_colors / renderpal->columns;
renderpal->rows = MAX (1, palette->n_colors / renderpal->columns);
if (palette->n_colors % renderpal->columns)
renderpal->rows += 1;
......
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