mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-16 23:24:16 +00:00
assistant: Fix a refcounting oversight
The assistant needs to hold a ref on the pages.
This commit is contained in:
parent
038a9b2b84
commit
c16a861f68
@ -1773,6 +1773,8 @@ gtk_assistant_insert_page (GtkAssistant *assistant,
|
||||
page_info->has_padding = TRUE;
|
||||
|
||||
return gtk_assistant_add_page (assistant, page_info, position);
|
||||
|
||||
g_object_unref (page_info);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -1815,7 +1817,7 @@ gtk_assistant_add_page (GtkAssistant *assistant,
|
||||
if (position < 0 || position > n_pages)
|
||||
position = n_pages;
|
||||
|
||||
priv->pages = g_list_insert (priv->pages, page_info, position);
|
||||
priv->pages = g_list_insert (priv->pages, g_object_ref (page_info), position);
|
||||
|
||||
if (position == 0)
|
||||
sibling = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user