From 82eafb8a2c6c5aaccff090d9a83110640148b75a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 1 Jul 2017 18:15:41 +0200 Subject: [PATCH] centerbox: Avoid accessing unset widgets --- gtk/gtkcenterbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkcenterbox.c b/gtk/gtkcenterbox.c index 2e15f04ff7..4a65b9d96a 100644 --- a/gtk/gtkcenterbox.c +++ b/gtk/gtkcenterbox.c @@ -448,7 +448,7 @@ gtk_center_box_size_allocate (GtkWidget *widget, for (i = 0; i < 3; i++) { - if (gtk_widget_get_valign (child[i]) == GTK_ALIGN_BASELINE) + if (child[i] && gtk_widget_get_valign (child[i]) == GTK_ALIGN_BASELINE) { int child_min_height, child_nat_height; int child_min_baseline, child_nat_baseline;