Commit a48c1d70 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

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).
parent c52aec71
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
......
......@@ -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);
......
......@@ -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);
......
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