[gimp] app: fix shutdown of GimpHistogramView
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix shutdown of GimpHistogramView
- Date: Wed, 5 Jul 2017 10:21:56 +0000 (UTC)
commit bc1997eeebcc503e31fc4611a8ab72e41399cdd1
Author: Michael Natterer <mitch gimp org>
Date: Wed Jul 5 12:20:23 2017 +0200
app: fix shutdown of GimpHistogramView
Not only unref the histograms, also disconnect from their signals.
app/widgets/gimphistogramview.c | 21 ++++++---------------
1 files changed, 6 insertions(+), 15 deletions(-)
---
diff --git a/app/widgets/gimphistogramview.c b/app/widgets/gimphistogramview.c
index e27960a..e45b68c 100644
--- a/app/widgets/gimphistogramview.c
+++ b/app/widgets/gimphistogramview.c
@@ -51,7 +51,7 @@ enum
};
-static void gimp_histogram_view_finalize (GObject *object);
+static void gimp_histogram_view_dispose (GObject *object);
static void gimp_histogram_view_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -117,7 +117,7 @@ gimp_histogram_view_class_init (GimpHistogramViewClass *klass)
G_TYPE_INT,
G_TYPE_INT);
- object_class->finalize = gimp_histogram_view_finalize;
+ object_class->dispose = gimp_histogram_view_dispose;
object_class->get_property = gimp_histogram_view_get_property;
object_class->set_property = gimp_histogram_view_set_property;
@@ -170,23 +170,14 @@ gimp_histogram_view_init (GimpHistogramView *view)
}
static void
-gimp_histogram_view_finalize (GObject *object)
+gimp_histogram_view_dispose (GObject *object)
{
GimpHistogramView *view = GIMP_HISTOGRAM_VIEW (object);
- if (view->histogram)
- {
- g_object_unref (view->histogram);
- view->histogram = NULL;
- }
-
- if (view->bg_histogram)
- {
- g_object_unref (view->bg_histogram);
- view->bg_histogram = NULL;
- }
+ gimp_histogram_view_set_histogram (view, NULL);
+ gimp_histogram_view_set_background (view, NULL);
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]