gimp r26263 - in trunk: . app/widgets



Author: neo
Date: Mon Jul 21 20:27:33 2008
New Revision: 26263
URL: http://svn.gnome.org/viewvc/gimp?rev=26263&view=rev

Log:
2008-07-21  Sven Neumann  <sven gimp org>

	* app/widgets/gimphistogrameditor.c
	(gimp_histogram_editor_set_image): always unset and ref the
	histograms. Plugs a memory leak reported by valgrind.



Modified:
   trunk/ChangeLog
   trunk/app/widgets/gimphistogrameditor.c

Modified: trunk/app/widgets/gimphistogrameditor.c
==============================================================================
--- trunk/app/widgets/gimphistogrameditor.c	(original)
+++ trunk/app/widgets/gimphistogrameditor.c	Mon Jul 21 20:27:33 2008
@@ -77,7 +77,7 @@
 
 
 static void
-gimp_histogram_editor_class_init (GimpHistogramEditorClass* klass)
+gimp_histogram_editor_class_init (GimpHistogramEditorClass *klass)
 {
   GimpImageEditorClass *image_editor_class = GIMP_IMAGE_EDITOR_CLASS (klass);
 
@@ -256,22 +256,22 @@
       g_signal_handlers_disconnect_by_func (image_editor->image,
                                             gimp_histogram_editor_menu_update,
                                             editor);
+    }
 
-      if (editor->histogram)
-        {
-          gimp_histogram_unref (editor->histogram);
-          editor->histogram = NULL;
+  if (editor->histogram)
+    {
+      gimp_histogram_unref (editor->histogram);
+      editor->histogram = NULL;
 
-          gimp_histogram_view_set_histogram (view, NULL);
-        }
+      gimp_histogram_view_set_histogram (view, NULL);
+    }
 
-      if (editor->bg_histogram)
-        {
-          gimp_histogram_unref (editor->bg_histogram);
-          editor->bg_histogram = NULL;
+  if (editor->bg_histogram)
+    {
+      gimp_histogram_unref (editor->bg_histogram);
+      editor->bg_histogram = NULL;
 
-          gimp_histogram_view_set_background (view, NULL);
-        }
+      gimp_histogram_view_set_background (view, NULL);
     }
 
   GIMP_IMAGE_EDITOR_CLASS (parent_class)->set_image (image_editor, image);



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