[Xfce4-commits] r30084 - terminal/branches/xfce_4_6/terminal
Nick Schermer
nick at xfce.org
Sat Jun 27 21:22:24 CEST 2009
Author: nick
Date: 2009-06-27 19:22:23 +0000 (Sat, 27 Jun 2009)
New Revision: 30084
Modified:
terminal/branches/xfce_4_6/terminal/terminal-window.c
Log:
Fix segfault in special tab configuration (bug #3809).
Modified: terminal/branches/xfce_4_6/terminal/terminal-window.c
===================================================================
--- terminal/branches/xfce_4_6/terminal/terminal-window.c 2009-06-27 19:21:52 UTC (rev 30083)
+++ terminal/branches/xfce_4_6/terminal/terminal-window.c 2009-06-27 19:22:23 UTC (rev 30084)
@@ -914,18 +914,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