Don't dereference a `NULL` page in `gtk_assistant_set_current_page()` if there are...
authorSebastian Dröge <sebastian@centricular.com>
Wed, 9 Feb 2022 15:50:13 +0000 (17:50 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 9 Feb 2022 15:50:55 +0000 (17:50 +0200)
gtk/gtkassistant.c

index 891b821e6bee0a8c897e2b551f187a271334c68a..464e6f1b683ca4732b891aaae8b3046dee103130 100644 (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);