[gtk+/gtk-style-context: 219/347] 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/347] GtkStyle: Protect against padding being NULL
- Date: Thu, 11 Nov 2010 01:22:55 +0000 (UTC)
commit e173b1616c9b3e386ed232a8e5f67ae17f8a57db
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]