From 8b4429b68dbaf51eceae966ac9f6c339b412b5de Mon Sep 17 00:00:00 2001 From: Nick Schermer <nick@xfce.org> Date: Mon, 29 Oct 2012 22:02:26 +0100 Subject: [PATCH] Avoid crash when toplevel window cannot be found (bug #9417). --- thunar/thunar-util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/thunar/thunar-util.c b/thunar/thunar-util.c index 24f7d0528..9ab597ec2 100644 --- a/thunar/thunar-util.c +++ b/thunar/thunar-util.c @@ -309,7 +309,8 @@ thunar_util_parse_parent (gpointer parent, { /* parent is a widget, so let's determine the toplevel window */ window = gtk_widget_get_toplevel (GTK_WIDGET (parent)); - if (gtk_widget_is_toplevel (window)) + if (window != NULL + && gtk_widget_is_toplevel (window)) { /* make sure the toplevel window is shown */ gtk_widget_show_now (window); -- GitLab