diff --git a/clutter/clutter-id-pool.c b/clutter/clutter-id-pool.c index b383e4bfd..53c7c6711 100644 --- a/clutter/clutter-id-pool.c +++ b/clutter/clutter-id-pool.c @@ -115,7 +115,14 @@ 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); - g_return_val_if_fail (id < id_pool->array->len, NULL); + 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 " + "correctly implemented or that there is an error in the " + "glReadPixels() implementation of the GL driver.", id); + return NULL; + } array = (void*) id_pool->array->data;