inspector: Fix selecting objects with a next tab

This was causing criticals.
This commit is contained in:
Matthias Clasen
2019-02-13 13:04:00 -05:00
parent 82fdd483d2
commit 8de8b8eebc
2 changed files with 2 additions and 2 deletions

View File

@@ -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);
}

View File

@@ -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);
}