mirror of https://github.com/GNOME/gimp.git
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:
parent
9570934d39
commit
38ffb13f5f
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue