diff --git a/gtk/inspector/misc-info.c b/gtk/inspector/misc-info.c index fc522ea6b1..9c3b3ec05f 100644 --- a/gtk/inspector/misc-info.c +++ b/gtk/inspector/misc-info.c @@ -181,7 +181,7 @@ show_object (GtkInspectorMiscInfo *sl, GObject *object, const gchar *tab) { - g_object_set_data (G_OBJECT (sl->priv->object_tree), "next-tab", (gpointer)tab); + g_object_set_data_full (G_OBJECT (sl->priv->object_tree), "next-tab", g_strdup (tab), g_free); gtk_inspector_object_tree_select_object (sl->priv->object_tree, object); } diff --git a/gtk/inspector/prop-list.c b/gtk/inspector/prop-list.c index 46b75513e3..567aa85867 100644 --- a/gtk/inspector/prop-list.c +++ b/gtk/inspector/prop-list.c @@ -212,7 +212,7 @@ show_object (GtkInspectorPropEditor *editor, popover = gtk_widget_get_ancestor (GTK_WIDGET (editor), GTK_TYPE_POPOVER); gtk_widget_hide (popover); - g_object_set_data (G_OBJECT (pl->priv->object_tree), "next-tab", (gpointer)tab); + g_object_set_data_full (G_OBJECT (pl->priv->object_tree), "next-tab", g_strdup (tab), g_free); gtk_inspector_object_tree_select_object (pl->priv->object_tree, object); }