diff options
author | Benjamin Berg <benjamin@sipsolutions.net> | 2006-11-26 19:43:12 +0000 |
---|---|---|
committer | Benjamin Berg <bberg@src.gnome.org> | 2006-11-26 19:43:12 +0000 |
commit | 683474c575b3fc4f174418497ec82fc76a89d9fd (patch) | |
tree | d0bb498373ca929ca6d3aa08fad0b6ae3765f7d5 /gtk/gtkstyle.c | |
parent | 7ad533044ad5b7b53ddc22312e0e971773ca7627 (diff) | |
download | gdk-pixbuf-683474c575b3fc4f174418497ec82fc76a89d9fd.tar.gz |
Protect against NULL widget. (#379503)
2006-11-26 Benjamin Berg <benjamin@sipsolutions.net>
* gtk/gtkstyle.c: (gtk_default_draw_flat_box): Protect against NULL
widget. (#379503)
Diffstat (limited to 'gtk/gtkstyle.c')
-rw-r--r-- | gtk/gtkstyle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index 0b56a0bbc..ed177917b 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -3435,7 +3435,7 @@ gtk_default_draw_flat_box (GtkStyle *style, !strcmp ("cell_even_ruled_sorted", detail)) { /* This has to be really broken; alex made me do it. -jrb */ - if (GTK_WIDGET_HAS_FOCUS (widget)) + if (widget && GTK_WIDGET_HAS_FOCUS (widget)) gc1 = style->base_gc[state_type]; else gc1 = style->base_gc[GTK_STATE_ACTIVE]; @@ -3443,7 +3443,7 @@ gtk_default_draw_flat_box (GtkStyle *style, else if (!strcmp ("cell_odd_ruled", detail) || !strcmp ("cell_odd_ruled_sorted", detail)) { - if (GTK_WIDGET_HAS_FOCUS (widget)) + if (widget && GTK_WIDGET_HAS_FOCUS (widget)) freeme = get_darkened_gc (window, &style->base[state_type], 1); else freeme = get_darkened_gc (window, &style->base[GTK_STATE_ACTIVE], 1); |