forked from AuroraMiddleware/gtk
stack: Fix check if page is selected
When there is no visible child, gtk_selection_model_is_selected() was returning TRUE for any invalid position. So check if the page is non-NULL and match
This commit is contained in:
parent
0351bc766c
commit
e211740da6
@ -562,7 +562,7 @@ gtk_stack_pages_is_selected (GtkSelectionModel *model,
|
||||
|
||||
page = g_list_nth_data (priv->children, position);
|
||||
|
||||
return page == priv->visible_child;
|
||||
return page && page == priv->visible_child;
|
||||
}
|
||||
|
||||
static void set_visible_child (GtkStack *stack,
|
||||
|
Loading…
Reference in New Issue
Block a user