Merge branch 'gtk_assisten_set_current_page-no-pages-guard' into 'main'

Don't dereference a `NULL` page in `gtk_assistant_set_current_page()` if there are no pages at all

See merge request GNOME/gtk!4464
This commit is contained in:
Matthias Clasen 2022-02-09 19:19:24 +00:00
commit 287de3844d

View File

@ -1478,6 +1478,7 @@ gtk_assistant_set_current_page (GtkAssistant *assistant,
GtkAssistantPage *page;
g_return_if_fail (GTK_IS_ASSISTANT (assistant));
g_return_if_fail (assistant->pages != NULL);
if (page_num >= 0)
page = (GtkAssistantPage *) g_list_nth_data (assistant->pages, page_num);