forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
fd7eda15f1
commit
37e2d4d892
@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
||||
Tue Jan 18 10:55:47 2005 Søren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_handle): Check for NULL detail
|
||||
|
@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
||||
Tue Jan 18 10:55:47 2005 Søren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_handle): Check for NULL detail
|
||||
|
@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
||||
Tue Jan 18 10:55:47 2005 Søren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_handle): Check for NULL detail
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user