From 77ccdfc94e721d8b1d27b2a718e1b376d38ecaa0 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Sat, 11 Sep 2010 12:10:50 +0200 Subject: [PATCH] GtkStyle: Protect against padding being NULL --- gtk/gtkstyle.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index 310da02ff4..8f495a795d 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -705,10 +705,13 @@ gtk_style_update_from_context (GtkStyle *style) "padding", &padding, NULL); - style->xthickness = padding->left; - style->ythickness = padding->top; + if (padding) + { + style->xthickness = padding->left; + style->ythickness = padding->top; - gtk_border_free (padding); + gtk_border_free (padding); + } } static void