stack: Only compare page names if the new page has one

This commit is contained in:
Timm Bäder 2020-08-01 15:26:53 +02:00
parent f5af18738b
commit 2f65459fcc

View File

@ -1348,6 +1348,8 @@ gtk_stack_add_page (GtkStack *stack,
g_return_if_fail (child_info->widget != NULL);
if (child_info->name)
{
for (l = priv->children; l != NULL; l = l->next)
{
GtkStackPage *info = l->data;
@ -1358,6 +1360,7 @@ gtk_stack_add_page (GtkStack *stack,
break;
}
}
}
priv->children = g_list_append (priv->children, g_object_ref (child_info));