[gimp/gimp-2-10] app: avoid allocating empty tempbuf for drawable previews
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app: avoid allocating empty tempbuf for drawable previews
- Date: Sat, 3 Nov 2018 08:30:58 +0000 (UTC)
commit bc3847e851d5887807af5f1c1d5e4d393fb1e6bf
Author: Ell <ell_se yahoo com>
Date: Sat Nov 3 04:28:15 2018 -0400
app: avoid allocating empty tempbuf for drawable previews
In gimp_view_renderer_drawable_render(), make sure the preview size
is always at least 1x1.
Fixes commit 8009ea342a22ad5e9fa7373f4031b407c41f03cb.
(cherry picked from commit 963322fdd4c4b99520c909cf215191776ecfb6d1)
app/widgets/gimpviewrendererdrawable.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/app/widgets/gimpviewrendererdrawable.c b/app/widgets/gimpviewrendererdrawable.c
index 4368a74a0c..d8803298c5 100644
--- a/app/widgets/gimpviewrendererdrawable.c
+++ b/app/widgets/gimpviewrendererdrawable.c
@@ -275,6 +275,9 @@ gimp_view_renderer_drawable_render (GimpViewRenderer *renderer,
dst_height = view_height;
}
+ dst_width = MAX (dst_width, 1);
+ dst_height = MAX (dst_height, 1);
+
if (! empty)
{
async = gimp_drawable_get_sub_preview_async (drawable,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]