From f94a0624facf1762cf728941dff0fe42c4fd322c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 19 Sep 2023 14:46:07 -0400 Subject: [PATCH] gtk4-demo: Fix a crash This conversion of GtkStatusbar was a bit too quick. Fixes: #6107 --- demos/gtk-demo/application.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/gtk-demo/application.c b/demos/gtk-demo/application.c index cbd707a994..7dbbc93731 100644 --- a/demos/gtk-demo/application.c +++ b/demos/gtk-demo/application.c @@ -223,7 +223,7 @@ delete_messages (gpointer data) static void pop_message (GtkWidget *status) { - GList *messages = (GList *) g_object_get_data (G_OBJECT (status), "messages"); + GList *messages = (GList *) g_object_steal_data (G_OBJECT (status), "messages"); if (messages) { @@ -241,7 +241,7 @@ static void push_message (GtkWidget *status, const char *message) { - GList *messages = (GList *) g_object_get_data (G_OBJECT (status), "messages"); + GList *messages = (GList *) g_object_steal_data (G_OBJECT (status), "messages"); gtk_label_set_label (GTK_LABEL (status), message); messages = g_list_prepend (messages, g_strdup (message));