[Xfce4-commits] <terminal:master> Protect against NULL borders (bug #7253).
Nick Schermer
noreply at xfce.org
Tue Feb 8 17:44:01 CET 2011
Updating branch refs/heads/master
to 61440f863c00076eec981cd020659a4aadc19539 (commit)
from 5646b46570df8071bbe30ef152bc0d40f3ab2986 (commit)
commit 61440f863c00076eec981cd020659a4aadc19539
Author: Lionel Le Folgoc <mrpouit at gmail.com>
Date: Tue Feb 8 17:43:14 2011 +0100
Protect against NULL borders (bug #7253).
terminal/terminal-screen.c | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index fb447bb..a5312eb 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -1123,8 +1123,16 @@ terminal_screen_vte_resize_window (VteTerminal *terminal,
* returns a size in pixels */
#if VTE_CHECK_VERSION (0, 24, 0)
gtk_widget_style_get (GTK_WIDGET (terminal), "inner-border", &border, NULL);
- xpad = border->left + border->right;
- ypad = border->top + border->bottom;
+ if (border != NULL)
+ {
+ xpad = border->left + border->right;
+ ypad = border->top + border->bottom;
+ gtk_border_free (border);
+ }
+ else
+ {
+ xpad = ypad = 0;
+ }
#else
vte_terminal_get_padding (terminal, &xpad, &ypad);
#endif
@@ -1606,8 +1614,16 @@ terminal_screen_force_resize_window (TerminalScreen *screen,
#if VTE_CHECK_VERSION (0, 24, 0)
gtk_widget_style_get (GTK_WIDGET (screen->terminal), "inner-border", &border, NULL);
- xpad = border->left + border->right;
- ypad = border->top + border->bottom;
+ if (border != NULL)
+ {
+ xpad = border->left + border->right;
+ ypad = border->top + border->bottom;
+ gtk_border_free (border);
+ }
+ else
+ {
+ xpad = ypad = 0;
+ }
#else
vte_terminal_get_padding (VTE_TERMINAL (screen->terminal), &xpad, &ypad);
#endif
More information about the Xfce4-commits
mailing list