diff --git a/gtk/gtkallocatedbitmask.c b/gtk/gtkallocatedbitmask.c index 567b86cb91..0950d4362d 100644 --- a/gtk/gtkallocatedbitmask.c +++ b/gtk/gtkallocatedbitmask.c @@ -52,6 +52,9 @@ gtk_allocated_bitmask_resize (GtkBitmask *mask, { gsize i; + if (size == mask->len) + return mask; + mask = g_realloc (mask, sizeof (GtkBitmask) + sizeof(VALUE_TYPE) * (size - 1)); for (i = mask->len; i < size; i++)