[gtk+] colorbutton: fix crash when destroying the colorbutton from the color-set signal
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] colorbutton: fix crash when destroying the colorbutton from the color-set signal
- Date: Wed, 8 Jan 2014 13:38:43 +0000 (UTC)
commit 75ef6096c1a9717949410d3e819d053e28b530ed
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Wed Jan 8 14:37:57 2014 +0100
colorbutton: fix crash when destroying the colorbutton from the color-set signal
gtk/gtkcolorbutton.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c
index ae9afd1..027b384 100644
--- a/gtk/gtkcolorbutton.c
+++ b/gtk/gtkcolorbutton.c
@@ -567,6 +567,7 @@ dialog_response (GtkDialog *dialog,
gtk_widget_queue_draw (button->priv->draw_area);
+ g_object_ref (button);
g_signal_emit (button, color_button_signals[COLOR_SET], 0);
g_object_freeze_notify (G_OBJECT (button));
@@ -574,6 +575,7 @@ dialog_response (GtkDialog *dialog,
g_object_notify (G_OBJECT (button), "alpha");
g_object_notify (G_OBJECT (button), "rgba");
g_object_thaw_notify (G_OBJECT (button));
+ g_object_unref (button);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]