[gimp] app: use g_signal_connect_object() to connect the history to the color dialog



commit 73e482855663bbb4e819bb123301d778e53dabb3
Author: Michael Natterer <mitch gimp org>
Date:   Sat Nov 29 13:48:00 2014 +0100

    app: use g_signal_connect_object() to connect the history to the color dialog
    
    It crashed when the history changed after a dialog way destroyed.

 app/widgets/gimpcolordialog.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/app/widgets/gimpcolordialog.c b/app/widgets/gimpcolordialog.c
index dafb0aa..d630d08 100644
--- a/app/widgets/gimpcolordialog.c
+++ b/app/widgets/gimpcolordialog.c
@@ -200,9 +200,9 @@ gimp_color_dialog_constructed (GObject *object)
 
   history = gimp_palettes_get_color_history (viewable_dialog->context->gimp);
 
-  g_signal_connect (history, "dirty",
-                    G_CALLBACK (gimp_color_history_changed),
-                    dialog);
+  g_signal_connect_object (history, "dirty",
+                           G_CALLBACK (gimp_color_history_changed),
+                           G_OBJECT (dialog), 0);
 
   gimp_color_history_changed (history, dialog);
 }


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