[gtk+] dialog: Avoid possible use-after-free
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] dialog: Avoid possible use-after-free
- Date: Mon, 17 Mar 2014 13:29:42 +0000 (UTC)
commit 20c764fc5ea09f0f0160bdf5e57946eccd56613c
Author: Bastien Nocera <hadess hadess net>
Date: Mon Mar 17 09:27:36 2014 +0100
dialog: Avoid possible use-after-free
When the dialogue's titlebar was replaced, we were still trying to
update the label we constructed but that was now destroyed.
https://bugzilla.gnome.org/show_bug.cgi?id=726492
gtk/gtkdialog.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index 3b54c46..19039ba 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -304,7 +304,7 @@ apply_use_header_bar (GtkDialog *dialog)
label = gtk_label_new ("");
gtk_style_context_add_class (gtk_widget_get_style_context (label), "title");
gtk_box_set_center_widget (GTK_BOX (box), label);
- g_signal_connect (dialog, "notify::title", G_CALLBACK (update_title), label);
+ g_signal_connect_object (dialog, "notify::title", G_CALLBACK (update_title), label, 0);
}
gtk_window_set_titlebar (GTK_WINDOW (dialog), box);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]