app/core/gimpdrawable-preview.c added sanity so we don't just plain crash

2004-05-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-preview.c
	* app/core/gimpimage-projection.c: added sanity so we don't just
	plain crash when an indexed image doesn't have a colormap.

	* plug-ins/common/png.c: keep at least one entry in the colormap.
	Fixes bug #142029.
This commit is contained in:
Sven Neumann
2004-05-06 20:18:53 +00:00
committed by Sven Neumann
parent 4549d5a902
commit 2e76c29d4a
5 changed files with 26 additions and 4 deletions

View File

@ -717,6 +717,8 @@ project_indexed (GimpImage *gimage,
PixelRegion *src,
PixelRegion *dest)
{
g_return_if_fail (gimage->cmap != NULL);
if (! gimage->construct_flag)
initial_region (src, dest, NULL, gimage->cmap,
layer->opacity * 255.999,
@ -734,6 +736,8 @@ project_indexed_alpha (GimpImage *gimage,
PixelRegion *dest,
PixelRegion *mask)
{
g_return_if_fail (gimage->cmap != NULL);
if (! gimage->construct_flag)
initial_region (src, dest, mask, gimage->cmap,
layer->opacity * 255.999,