[gimp/gimp-2-8] Bug 724731 - Difference clouds - memory leak if UNDO performed
- From: Thomas Manni <tmanni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] Bug 724731 - Difference clouds - memory leak if UNDO performed
- Date: Wed, 2 Mar 2016 19:31:24 +0000 (UTC)
commit 21a50c43cd66f1f9cedc18adc364b010dd9a9cba
Author: Thomas Manni <thomas manni free fr>
Date: Tue Mar 1 22:40:01 2016 +0100
Bug 724731 - Difference clouds - memory leak if UNDO performed
Create the clouds layer after calling gimp-image-undo-group-start
(cherry picked from commit a8a214ffcbb23649dad691bc84cdeb2c2baaf54a)
plug-ins/script-fu/scripts/difference-clouds.scm | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/script-fu/scripts/difference-clouds.scm
b/plug-ins/script-fu/scripts/difference-clouds.scm
index 45ac44d..beb10b5 100644
--- a/plug-ins/script-fu/scripts/difference-clouds.scm
+++ b/plug-ins/script-fu/scripts/difference-clouds.scm
@@ -29,14 +29,17 @@
(width (cadddr (gimp-drawable-mask-intersect drawable)))
(height (caddr (cddr (gimp-drawable-mask-intersect drawable))))
(type (car (gimp-drawable-type-with-alpha drawable)))
- (diff-clouds (car (gimp-layer-new image width height type
- "Clouds" 100 DIFFERENCE-MODE)))
+ (diff-clouds -1)
(offset-x 0)
(offset-y 0)
)
(gimp-image-undo-group-start image)
+ ; Create the cloud layer
+ (set! diff-clouds (car (gimp-layer-new image width height type
+ "Clouds" 100 DIFFERENCE-MODE)))
+
; Add the cloud layer above the current layer
(gimp-image-insert-layer image diff-clouds 0 -1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]