[gtk+/gtk-style-context: 219/260] GtkStyle: Protect against padding being NULL
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 219/260] GtkStyle: Protect against padding being NULL
- Date: Wed, 20 Oct 2010 10:39:50 +0000 (UTC)
commit b843b112660ff0f3bb9b0273102e90458f651589
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Sep 11 12:10:50 2010 +0200
GtkStyle: Protect against padding being NULL
gtk/gtkstyle.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index 310da02..8f495a7 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]