diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-12-23 22:33:02 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-12-23 22:33:02 -0500 |
commit | db42c23c0a90b72c421dc75d31789aa425175982 (patch) | |
tree | ecd03a55da1ec2617be581ab37b5647c05062e7f /demos | |
parent | 33716d1e50f25a6a054c9a15aadcc20f19359982 (diff) | |
download | gtk+-db42c23c0a90b72c421dc75d31789aa425175982.tar.gz |
gtk-demo: Fix a crash in the font explorer demo
gtk_widget_add_controller is transfer-full.
Diffstat (limited to 'demos')
-rw-r--r-- | demos/gtk-demo/font_features.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |