mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
[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:
parent
142f886518
commit
a4ff4d37a4
@ -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 "
|
||||
|
Loading…
Reference in New Issue
Block a user