[Xfce4-commits] <thunar:master> Avoid crash when toplevel window cannot be found (bug #9417).

Nick Schermer noreply at xfce.org
Mon Oct 29 22:04:01 CET 2012


Updating branch refs/heads/master
         to 8b4429b68dbaf51eceae966ac9f6c339b412b5de (commit)
       from c3baf825e14bc8d4b578eca505ce00d3a2530bdf (commit)

commit 8b4429b68dbaf51eceae966ac9f6c339b412b5de
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Oct 29 22:02:26 2012 +0100

    Avoid crash when toplevel window cannot be found (bug #9417).

 thunar/thunar-util.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/thunar/thunar-util.c b/thunar/thunar-util.c
index 24f7d05..9ab597e 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);


More information about the Xfce4-commits mailing list