forked from AuroraMiddleware/gtk
GtkStyleContext: Don crash on empty class sets.
This commit is contained in:
parent
038bcdcdb6
commit
27f5257d49
@ -649,9 +649,14 @@ style_class_find (GArray *array,
|
||||
guint min, max, mid;
|
||||
gboolean found = FALSE;
|
||||
|
||||
if (position)
|
||||
*position = 0;
|
||||
|
||||
if (!array || array->len == 0)
|
||||
return FALSE;
|
||||
|
||||
min = 0;
|
||||
max = array->len - 1;
|
||||
mid = max - min / 2;
|
||||
|
||||
do
|
||||
{
|
||||
@ -683,9 +688,14 @@ child_style_class_find (GArray *array,
|
||||
guint min, max, mid;
|
||||
gboolean found = FALSE;
|
||||
|
||||
if (position)
|
||||
*position = 0;
|
||||
|
||||
if (!array || array->len == 0)
|
||||
return FALSE;
|
||||
|
||||
min = 0;
|
||||
max = array->len - 1;
|
||||
mid = max - min / 2;
|
||||
|
||||
do
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user