[Xfce4-commits] r30100 - terminal/trunk/terminal

Nick Schermer nick at xfce.org
Sat Jun 27 21:32:07 CEST 2009


Author: nick
Date: 2009-06-27 19:32:07 +0000 (Sat, 27 Jun 2009)
New Revision: 30100

Modified:
   terminal/trunk/terminal/terminal-window.c
Log:
Fix segfault in special tab configuration (bug #3809).


Modified: terminal/trunk/terminal/terminal-window.c
===================================================================
--- terminal/trunk/terminal/terminal-window.c	2009-06-27 19:31:57 UTC (rev 30099)
+++ terminal/trunk/terminal/terminal-window.c	2009-06-27 19:32:07 UTC (rev 30100)
@@ -907,18 +907,21 @@
   /* change the visibility if the new status differs */
   if (((npages > 1) != tabs_shown) || (always_show_tabs && !tabs_shown))
     {
+      /* show or hide the tabs */
+      gtk_notebook_set_show_tabs (GTK_NOTEBOOK (window->notebook), 
+                                 always_show_tabs | !tabs_shown);
+
+      /* don't focus the notebook */
+      GTK_WIDGET_UNSET_FLAGS (window->notebook, GTK_CAN_FOCUS);
+
       /* get active screen */
       active = terminal_window_get_active (window);
+      if (G_UNLIKELY (active == NULL))
+        return;
 
       /* get screen grid size */
       terminal_screen_get_size (active, &grid_width, &grid_height);
 
-      /* show or hide the tabs */
-      gtk_notebook_set_show_tabs (GTK_NOTEBOOK (window->notebook), !tabs_shown);
-
-      /* don't focus the notebook */
-      GTK_WIDGET_UNSET_FLAGS (window->notebook, GTK_CAN_FOCUS);
-
       /* resize the window */
       terminal_screen_force_resize_window (active, GTK_WINDOW (window), grid_width, grid_height);
     }




More information about the Xfce4-commits mailing list