[clutter-id-pool] Fix the check for out-of-range IDs

If id == the length of the array then it is also invalid and could
cause a crash.
This commit is contained in:
Neil Roberts 2009-10-07 12:46:43 +01:00
parent 142f886518
commit a4ff4d37a4

View File

@ -115,7 +115,7 @@ clutter_id_pool_lookup (ClutterIDPool *id_pool,
g_return_val_if_fail (id_pool != NULL, NULL);
g_return_val_if_fail (id_pool->array != NULL, NULL);
if (id > id_pool->array->len)
if (id >= id_pool->array->len)
{
g_warning ("The required ID of %u is outside the ID range; this "
"usually implies that the pick() of an actor is not "