gimp_drawable_get_color_at(): put the check below back but only require a

2000-03-01  Michael Natterer  <mitch@gimp.org>

	* app/gimpdrawable.c: gimp_drawable_get_color_at(): put the check
	below back but only require a non-indexed drawable if the drawable
	doesn't have an image.
	(The function may call gimp_image_get_color() with gimage == NULL
	for RGB and GRAY colors because we don't need a colormap to
	transform them to RGB space).
	This was the obscure special case (TM).
This commit is contained in:
Michael Natterer 2000-03-01 22:05:22 +00:00 committed by Michael Natterer
parent c52aec7129
commit a48c1d7065
3 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,13 @@
2000-03-01 Michael Natterer <mitch@gimp.org>
* app/gimpdrawable.c: gimp_drawable_get_color_at(): put the check
below back but only require a non-indexed drawable if the drawable
doesn't have an image.
(The function may call gimp_image_get_color() with gimage == NULL
for RGB and GRAY colors because we don't need a colormap to
transform them to RGB space).
This was the obscure special case (TM).
2000-03-01 Michael Natterer <mitch@gimp.org>
* app/gimpdrawable.c: gimp_drawable_get_color_at(): don't

View File

@ -424,7 +424,8 @@ gimp_drawable_get_color_at (GimpDrawable *drawable,
g_return_val_if_fail (drawable != NULL, NULL);
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
g_return_val_if_fail (gimp_drawable_gimage (drawable), NULL);
g_return_val_if_fail (gimp_drawable_gimage (drawable) ||
!gimp_drawable_is_indexed (drawable), NULL);
g_return_val_if_fail (x >= 0 && x < drawable->width &&
y >= 0 && y < drawable->height, NULL);

View File

@ -424,7 +424,8 @@ gimp_drawable_get_color_at (GimpDrawable *drawable,
g_return_val_if_fail (drawable != NULL, NULL);
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
g_return_val_if_fail (gimp_drawable_gimage (drawable), NULL);
g_return_val_if_fail (gimp_drawable_gimage (drawable) ||
!gimp_drawable_is_indexed (drawable), NULL);
g_return_val_if_fail (x >= 0 && x < drawable->width &&
y >= 0 && y < drawable->height, NULL);