libgimp: fix gimp_drawable_get_sub_thumbnail_data().

Since commit 89c359ce47, it's supposed to return a GBytes, yet it was returning
raw data (probably intermediate hacking state which was not properly cleaned
up).

It was crashing for instance GimpDrawablePreview widgets at drawing time.
This commit is contained in:
Jehan 2023-06-21 00:04:31 +02:00
parent 4b8f2113f3
commit 4136166d12

View file

@ -186,24 +186,19 @@ gimp_drawable_get_sub_thumbnail_data (GimpDrawable *drawable,
gint *actual_height,
gint *bpp)
{
gint ret_width, ret_height;
GBytes *image_bytes;
gsize data_size;
_gimp_drawable_sub_thumbnail (drawable,
src_x, src_y,
src_width, src_height,
dest_width,
dest_height,
&ret_width,
&ret_height,
dest_width,
dest_height,
actual_width,
actual_height,
bpp,
&image_bytes);
*actual_width = ret_width;
*actual_height = ret_height;
return g_bytes_unref_to_data (image_bytes, &data_size);
return image_bytes;
}
/**