[gtk/gtk-demo-fixes: 4/9] gtk-demo: Fix a crash in the font explorer demo
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-demo-fixes: 4/9] gtk-demo: Fix a crash in the font explorer demo
- Date: Tue, 24 Dec 2019 08:41:15 +0000 (UTC)
commit db42c23c0a90b72c421dc75d31789aa425175982
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Dec 23 22:33:02 2019 -0500
gtk-demo: Fix a crash in the font explorer demo
gtk_widget_add_controller is transfer-full.
demos/gtk-demo/font_features.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/demos/gtk-demo/font_features.c b/demos/gtk-demo/font_features.c
index 1fc8e92d69..dbd22e0663 100644
--- a/demos/gtk-demo/font_features.c
+++ b/demos/gtk-demo/font_features.c
@@ -1228,7 +1228,7 @@ do_font_features (GtkWidget *do_widget)
edit_toggle = GTK_WIDGET (gtk_builder_get_object (builder, "edit_toggle"));
controller = gtk_event_controller_key_new ();
- g_object_set_data_full (G_OBJECT (entry), "controller", controller, g_object_unref);
+ g_object_set_data_full (G_OBJECT (entry), "controller", g_object_ref (controller), g_object_unref);
g_signal_connect (controller, "key-pressed", G_CALLBACK (entry_key_press), entry);
gtk_widget_add_controller (entry, controller);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]