From 571da2a8b34cf0652a0ba14adc35093b86631ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 26 Aug 2015 11:54:01 +0200 Subject: [PATCH] Inspector: Protect against childless windows --- gtk/inspector/inspect-button.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gtk/inspector/inspect-button.c b/gtk/inspector/inspect-button.c index b2cdfb537f..c0df8deae5 100644 --- a/gtk/inspector/inspect-button.c +++ b/gtk/inspector/inspect-button.c @@ -405,10 +405,14 @@ draw_flash (GtkWidget *widget, if (GTK_IS_WINDOW (widget)) { + GtkWidget *child = gtk_bin_get_child (GTK_BIN (widget)); /* We don't want to draw the drag highlight around the * CSD window decorations */ - gtk_widget_get_allocation (gtk_bin_get_child (GTK_BIN (widget)), &alloc); + if (child == NULL) + return FALSE; + + gtk_widget_get_allocation (child, &alloc); } else {