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

This commit is contained in:
Sebastian Dröge 2022-02-09 17:50:13 +02:00
parent b893dc9552
commit 878e4a34d3

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);