diff options
author | Bastien Nocera <hadess@hadess.net> | 2014-03-17 09:27:36 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2014-03-17 14:29:10 +0100 |
commit | 20c764fc5ea09f0f0160bdf5e57946eccd56613c (patch) | |
tree | 44a4336f8627e8ce5b89fdd97161fff6956ecbb8 /gtk/gtkdialog.c | |
parent | 5b4a942260ff2eda91d43b398cd22979ea0bb705 (diff) | |
download | gtk+-20c764fc5ea09f0f0160bdf5e57946eccd56613c.tar.gz |
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
Diffstat (limited to 'gtk/gtkdialog.c')
-rw-r--r-- | gtk/gtkdialog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index 3b54c46b00..19039ba27f 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); |