mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
Clarify the IdPool warning
Instead of having an assertion failure with a message of dubious usefulness, we should probably use a more verbose warning explaining what is the problem and what might be the cause.
This commit is contained in:
parent
6ddffac935
commit
ad83caaed1
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user