node editor: Manually unrealize all created renderers

This has not been a problem before since we were leaking them.
This commit is contained in:
Timm Bäder 2019-07-13 09:37:47 +02:00
parent a13d6bbbdf
commit 0f3ca349e7

View File

@ -707,6 +707,14 @@ static void
node_editor_window_unrealize (GtkWidget *widget)
{
NodeEditorWindow *self = NODE_EDITOR_WINDOW (widget);
guint i;
for (i = 0; i < g_list_model_get_n_items (G_LIST_MODEL (self->renderers)); i ++)
{
gpointer item = g_list_model_get_item (G_LIST_MODEL (self->renderers), i);
gsk_renderer_unrealize (gtk_renderer_paintable_get_renderer (item));
g_object_unref (item);
}
g_list_store_remove_all (self->renderers);