[gimp] app: in gimp_projection_chunk_render_start(), don't leak empty region
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: in gimp_projection_chunk_render_start(), don't leak empty region
- Date: Sat, 12 Jan 2019 13:20:40 +0000 (UTC)
commit 0e5de9576056a3262638e1aa5a23ca2a450d335a
Author: Ell <ell_se yahoo com>
Date: Sat Jan 12 08:14:40 2019 -0500
app: in gimp_projection_chunk_render_start(), don't leak empty region
In gimp_projection_chunk_render_start(), don't leak the current
update region when it's empty, but not NULL, and properly shut down
the idle source.
app/core/gimpprojection.c | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/app/core/gimpprojection.c b/app/core/gimpprojection.c
index bc5dfb01eb..7dfe28d8e2 100644
--- a/app/core/gimpprojection.c
+++ b/app/core/gimpprojection.c
@@ -741,6 +741,17 @@ gimp_projection_chunk_render_start (GimpProjection *proj)
proj, NULL);
}
}
+ else
+ {
+ if (region)
+ cairo_region_destroy (region);
+
+ if (proj->priv->idle_id)
+ {
+ g_source_remove (proj->priv->idle_id);
+ proj->priv->idle_id = 0;
+ }
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]