Commit ca004e16 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Don't do a lookup immediately after creating style->property_cache, since

Mon Sep 10 06:50:39 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkstyle.c (_gtk_style_peek_property_value): Don't
	do a lookup immediately after creating style->property_cache,
	since bsearch crashes on zero length for Solaris.
parent ca8cf020
Mon Sep 10 06:50:39 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (_gtk_style_peek_property_value): Don't
do a lookup immediately after creating style->property_cache,
since bsearch crashes on zero length for Solaris.
(Found by Padraig O'Briain.)
2001-09-09 Alexander Larsson <alla@lysator.liu.se>
* gtk/gtkwidget.c (_gtk_widget_peek_colormap):
......
Mon Sep 10 06:50:39 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (_gtk_style_peek_property_value): Don't
do a lookup immediately after creating style->property_cache,
since bsearch crashes on zero length for Solaris.
(Found by Padraig O'Briain.)
2001-09-09 Alexander Larsson <alla@lysator.liu.se>
* gtk/gtkwidget.c (_gtk_widget_peek_colormap):
......
Mon Sep 10 06:50:39 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (_gtk_style_peek_property_value): Don't
do a lookup immediately after creating style->property_cache,
since bsearch crashes on zero length for Solaris.
(Found by Padraig O'Briain.)
2001-09-09 Alexander Larsson <alla@lysator.liu.se>
* gtk/gtkwidget.c (_gtk_widget_peek_colormap):
......
Mon Sep 10 06:50:39 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (_gtk_style_peek_property_value): Don't
do a lookup immediately after creating style->property_cache,
since bsearch crashes on zero length for Solaris.
(Found by Padraig O'Briain.)
2001-09-09 Alexander Larsson <alla@lysator.liu.se>
* gtk/gtkwidget.c (_gtk_widget_peek_colormap):
......
Mon Sep 10 06:50:39 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (_gtk_style_peek_property_value): Don't
do a lookup immediately after creating style->property_cache,
since bsearch crashes on zero length for Solaris.
(Found by Padraig O'Briain.)
2001-09-09 Alexander Larsson <alla@lysator.liu.se>
* gtk/gtkwidget.c (_gtk_widget_peek_colormap):
......
Mon Sep 10 06:50:39 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (_gtk_style_peek_property_value): Don't
do a lookup immediately after creating style->property_cache,
since bsearch crashes on zero length for Solaris.
(Found by Padraig O'Briain.)
2001-09-09 Alexander Larsson <alla@lysator.liu.se>
* gtk/gtkwidget.c (_gtk_widget_peek_colormap):
......
Mon Sep 10 06:50:39 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (_gtk_style_peek_property_value): Don't
do a lookup immediately after creating style->property_cache,
since bsearch crashes on zero length for Solaris.
(Found by Padraig O'Briain.)
2001-09-09 Alexander Larsson <alla@lysator.liu.se>
* gtk/gtkwidget.c (_gtk_widget_peek_colormap):
......
......@@ -1303,15 +1303,16 @@ _gtk_style_peek_property_value (GtkStyle *style,
/* need value cache array */
if (!style->property_cache)
style->property_cache = g_array_new (FALSE, FALSE, sizeof (PropertyValue));
/* lookup, or insert value if not yet present */
key.widget_type = widget_type;
key.pspec = pspec;
pcache = bsearch (&key,
style->property_cache->data, style->property_cache->len,
sizeof (PropertyValue), style_property_values_cmp);
if (pcache)
return &pcache->value;
else
{
key.widget_type = widget_type;
key.pspec = pspec;
pcache = bsearch (&key,
style->property_cache->data, style->property_cache->len,
sizeof (PropertyValue), style_property_values_cmp);
if (pcache)
return &pcache->value;
}
i = 0;
while (i < style->property_cache->len &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment