[gtk: 1/2] Don't dereference a `NULL` page in `gtk_assistant_set_current_page()` if there are no pages at all
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] Don't dereference a `NULL` page in `gtk_assistant_set_current_page()` if there are no pages at all
- Date: Wed, 9 Feb 2022 19:19:25 +0000 (UTC)
commit 878e4a34d339c376ceb78655cd44c58b06411f1d
Author: Sebastian Dröge <sebastian centricular com>
Date: Wed Feb 9 17:50:13 2022 +0200
Don't dereference a `NULL` page in `gtk_assistant_set_current_page()` if there are no pages at all
gtk/gtkassistant.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c
index 891b821e6b..464e6f1b68 100644
--- a/gtk/gtkassistant.c
+++ b/gtk/gtkassistant.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]