don't call gdk_draw_pixbuf() with a zero width. Fixes bug #349483.

2007-05-09  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-preview.c
	(gimp_display_shell_draw_tri_row)
	(gimp_display_shell_draw_tri_row_mask): don't call 
gdk_draw_pixbuf()
	with a zero width. Fixes bug #349483.


svn path=/trunk/; revision=22458
This commit is contained in:
Sven Neumann 2007-05-09 06:53:56 +00:00 committed by Sven Neumann
parent 9570934d39
commit 38ffb13f5f
2 changed files with 44 additions and 18 deletions

View File

@ -1,3 +1,10 @@
2007-05-09 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-preview.c
(gimp_display_shell_draw_tri_row)
(gimp_display_shell_draw_tri_row_mask): don't call gdk_draw_pixbuf()
with a zero width. Fixes bug #349483.
2007-05-08 Raphaël Quinet <raphael@gimp.org>
* plug-ins/metadata/xmp-encode.c (gen_property): quick workaround

View File

@ -507,15 +507,24 @@ gimp_display_shell_draw_tri_row (GimpDrawable *texture,
x1 = 0;
}
else if (x1 > gdk_pixbuf_get_width (row))
{
return;
}
if (x2 < 0)
{
return;
}
else if (x2 > gdk_pixbuf_get_width (row))
{
x2 = gdk_pixbuf_get_width (row);
}
dx = x2 - x1;
if (! dx)
return;
switch (gimp_drawable_type (texture))
{
case GIMP_INDEXED_IMAGE:
@ -669,16 +678,26 @@ gimp_display_shell_draw_tri_row_mask (GimpDrawable *texture,
x1 = 0;
}
else if (x1 > gdk_pixbuf_get_width (row))
{
return;
}
if (x2 < 0)
{
return;
}
else if (x2 > gdk_pixbuf_get_width (row))
{
x2 = gdk_pixbuf_get_width (row);
}
dx = x2 - x1;
if (! dx)
return;
mu = u + mask_offx;
mv = v + mask_offy;
dx = x2 - x1;
switch (gimp_drawable_type (texture))
{