[gimp] app: again properly disconnect signal handlers.



commit edb90672fb96b9b5e6df6b02233998c24e3a0f63
Author: Jehan <jehan girinstud io>
Date:   Mon Mar 18 14:37:32 2019 +0100

    app: again properly disconnect signal handlers.

 app/widgets/gimpcolorhistory.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/app/widgets/gimpcolorhistory.c b/app/widgets/gimpcolorhistory.c
index 4e377dcc94..45354f17b7 100644
--- a/app/widgets/gimpcolorhistory.c
+++ b/app/widgets/gimpcolorhistory.c
@@ -183,6 +183,14 @@ gimp_color_history_finalize (GObject *object)
 {
   GimpColorHistory *history = GIMP_COLOR_HISTORY (object);
 
+  if (history->context)
+    g_signal_handlers_disconnect_by_func (history->context,
+                                          gimp_color_history_image_changed,
+                                          history);
+  if (history->active_image)
+    g_signal_handlers_disconnect_by_func (history->active_image,
+                                          G_CALLBACK (gimp_color_history_palette_dirty),
+                                          history);
   g_free (history->color_areas);
   history->color_areas = NULL;
   g_free (history->buttons);


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