[gimp] app: don't leak the changed region in gimp_canvas_item_end_change()



commit b392ae6515953c37d7ed18d7f830d2c9fd783918
Author: Michael Natterer <mitch gimp org>
Date:   Sat Oct 2 19:57:41 2010 +0200

    app: don't leak the changed region in gimp_canvas_item_end_change()

 app/display/gimpcanvasitem.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/app/display/gimpcanvasitem.c b/app/display/gimpcanvasitem.c
index ff467e6..e4a7fe4 100644
--- a/app/display/gimpcanvasitem.c
+++ b/app/display/gimpcanvasitem.c
@@ -493,6 +493,11 @@ gimp_canvas_item_end_change (GimpCanvasItem *item)
           gdk_region_destroy (region);
         }
     }
+  else if (private->change_region)
+    {
+      gdk_region_destroy (private->change_region);
+      private->change_region = NULL;
+    }
 }
 
 void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]