summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-01-18 16:43:45 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-01-18 16:43:45 +0000
commitf13bfda4db52635017ac28386e07c71e33edc56c (patch)
treead5002fbc630216fe11bd0bfb934b0fd0d6e4591 /gtk
parent2033e6f0eca01ae3da493bdf2125b923982a3457 (diff)
downloadgdk-pixbuf-f13bfda4db52635017ac28386e07c71e33edc56c.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')
-rw-r--r--gtk/gtkstyle.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index 141977c23..a7df26367 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)