GtkStackPrivate *priv = gtk_stack_get_instance_private (pages->stack);
GtkStackPage *page;
-
- if (position > priv->children->len - 1)
+ if (position >= priv->children->len)
return NULL;
page = g_ptr_array_index (priv->children, position);
GtkStackPrivate *priv = gtk_stack_get_instance_private (pages->stack);
GtkStackPage *page;
- if (position > priv->children->len - 1)
+ if (position >= priv->children->len)
return FALSE;
page = g_ptr_array_index (priv->children, position);
GtkStackPrivate *priv = gtk_stack_get_instance_private (pages->stack);
GtkStackPage *page;
+ if (position >= priv->children->len)
+ return FALSE;
+
page = g_ptr_array_index (priv->children, position);
set_visible_child (pages->stack, page, priv->transition_type, priv->transition_duration);
if (priv->children->len > 0)
page_accessible = GTK_ACCESSIBLE (g_object_ref (g_ptr_array_index (priv->children, 0)));
-
+
return page_accessible;
}