diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-01-18 16:44:25 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-01-18 16:44:25 +0000 |
commit | 37e2d4d89271dd9ce72eb1a2bcdb9edac0ba5707 (patch) | |
tree | 5b7334a627ea28bd116ead05870e6495dd83bfe9 /gtk/gtkstyle.c | |
parent | fd7eda15f1943a3551f83d64cd3f4cccede20c0b (diff) | |
download | gtk+-37e2d4d89271dd9ce72eb1a2bcdb9edac0ba5707.tar.gz |
Add some more NULL checks, patch by Michael Natterer.
2005-01-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkstyle.c (gtk_default_draw_check)
(gtk_default_draw_option, gtk_default_draw_handle): Add some
more NULL checks, patch by Michael Natterer.
Diffstat (limited to 'gtk/gtkstyle.c')
-rw-r--r-- | gtk/gtkstyle.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index 141977c238..a7df263678 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -3833,7 +3833,7 @@ gtk_default_draw_check (GtkStyle *style, x -= (1 + INDICATOR_PART_SIZE - width) / 2; y -= (1 + INDICATOR_PART_SIZE - height) / 2; - if (strcmp (detail, "check") == 0) /* Menu item */ + if (detail && strcmp (detail, "check") == 0) /* Menu item */ { text_gc = style->fg_gc[state_type]; base_gc = style->bg_gc[state_type]; @@ -3931,7 +3931,7 @@ gtk_default_draw_option (GtkStyle *style, x -= (1 + INDICATOR_PART_SIZE - width) / 2; y -= (1 + INDICATOR_PART_SIZE - height) / 2; - if (strcmp (detail, "option") == 0) /* Menu item */ + if (detail && strcmp (detail, "option") == 0) /* Menu item */ { text_gc = style->fg_gc[state_type]; base_gc = style->bg_gc[state_type]; @@ -3965,7 +3965,7 @@ gtk_default_draw_option (GtkStyle *style, } else if (shadow_type == GTK_SHADOW_ETCHED_IN) /* inconsistent */ { - if (strcmp (detail, "option") == 0) /* Menu item */ + if (detail && strcmp (detail, "option") == 0) /* Menu item */ { draw_part (window, text_gc, area, x, y, CHECK_INCONSISTENT_TEXT); } @@ -4926,7 +4926,7 @@ gtk_default_draw_handle (GtkStyle *style, gdk_gc_set_clip_rectangle (light_gc, &dest); gdk_gc_set_clip_rectangle (dark_gc, &dest); - if (!strcmp (detail, "paned")) + if (detail && !strcmp (detail, "paned")) { if (orientation == GTK_ORIENTATION_HORIZONTAL) for (xx = x + width/2 - 15; xx <= x + width/2 + 15; xx += 5) |