inspector: Don't leak recordings

g_list_model_get_item is transfer full, so we need
to drop the references we get from it. This was showing
up while testing the GL texture cache in GtkGLArea.
This commit is contained in:
Matthias Clasen 2018-01-17 19:12:27 -05:00
parent 5e7b3030b9
commit 18dc994de7

View File

@ -120,6 +120,9 @@ recordings_list_row_selected (GtkListBox *box,
}
gtk_tree_view_expand_all (GTK_TREE_VIEW (priv->render_node_tree));
if (recording)
g_object_unref (recording);
}
static void
@ -773,6 +776,8 @@ gtk_inspector_recorder_recordings_list_create_widget (gpointer item,
{
GtkInspectorRecording *r = g_list_model_get_item (priv->recordings, i);
g_object_unref (r);
if (r == recording)
break;