mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
Merge branch 'fix_gtkstack_crash' into 'main'
GtkStack: Fix a potential crash in gtk_stack_get_first_accessible_child See merge request GNOME/gtk!6031
This commit is contained in:
commit
e6bc82cff5
@ -809,9 +809,12 @@ gtk_stack_accessible_get_first_accessible_child (GtkAccessible *accessible)
|
||||
{
|
||||
GtkStack *stack = GTK_STACK (accessible);
|
||||
GtkStackPrivate *priv = gtk_stack_get_instance_private (stack);
|
||||
GtkStackPage *page = g_ptr_array_index (priv->children, 0);
|
||||
GtkAccessible *page_accessible = NULL;
|
||||
|
||||
return GTK_ACCESSIBLE (g_object_ref (page));
|
||||
if (priv->children->len > 0)
|
||||
page_accessible = GTK_ACCESSIBLE (g_object_ref (g_ptr_array_index (priv->children, 0)));
|
||||
|
||||
return page_accessible;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user