check if the drawable type fits to the image. This assertion would have

2003-06-12  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable.c (gimp_drawable_configure): check if the
	drawable type fits to the image. This assertion would have catched
	the problem below.
This commit is contained in:
Sven Neumann 2003-06-12 10:43:00 +00:00 committed by Sven Neumann
parent 653b4e0fe7
commit d942668ff6
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,9 @@
2003-06-12 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable.c (gimp_drawable_configure): check if the
drawable type fits to the image. This assertion would have catched
the problem below.
* app/core/gimptemplate.c (gimp_template_create_image): handle all
fill types, fixes bug #114979.

View File

@ -572,6 +572,7 @@ gimp_drawable_configure (GimpDrawable *drawable,
{
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IMAGE_TYPE_BASE_TYPE (type) == gimp_image_base_type (gimage));
gimp_item_configure (GIMP_ITEM (drawable), gimage,
offset_x, offset_y, width, height, name);
@ -583,8 +584,7 @@ gimp_drawable_configure (GimpDrawable *drawable,
if (drawable->tiles)
tile_manager_unref (drawable->tiles);
drawable->tiles = tile_manager_new (width, height,
drawable->bytes);
drawable->tiles = tile_manager_new (width, height, drawable->bytes);
drawable->visible = TRUE;