StTextureCache: fix load_sliced_image with different sizes
grid_width and grid_height were inverted, which caused a crash in GdkPixbuf code. This was never noticed because the animation in the panel is a square. https://bugzilla.gnome.org/show_bug.cgi?id=666606
This commit is contained in:
parent
77afd6782f
commit
875b6d131b
@ -1226,9 +1226,9 @@ load_sliced_image (GSimpleAsyncResult *result,
|
|||||||
|
|
||||||
width = gdk_pixbuf_get_width (pix);
|
width = gdk_pixbuf_get_width (pix);
|
||||||
height = gdk_pixbuf_get_height (pix);
|
height = gdk_pixbuf_get_height (pix);
|
||||||
for (y = 0; y < height; y += data->grid_width)
|
for (y = 0; y < height; y += data->grid_height)
|
||||||
{
|
{
|
||||||
for (x = 0; x < width; x += data->grid_height)
|
for (x = 0; x < width; x += data->grid_width)
|
||||||
{
|
{
|
||||||
GdkPixbuf *pixbuf = gdk_pixbuf_new_subpixbuf (pix, x, y, data->grid_width, data->grid_height);
|
GdkPixbuf *pixbuf = gdk_pixbuf_new_subpixbuf (pix, x, y, data->grid_width, data->grid_height);
|
||||||
g_assert (pixbuf != NULL);
|
g_assert (pixbuf != NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user