From 641582533952c91576fb53724b70cbe6afb119db Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 25 Feb 2010 14:02:29 +0000 Subject: [PATCH] animator: Remove NULL check in remove_key() The arguments for remove_key() can be NULL, but there is an extraneous assertion that fails if they are. The pre-conditions should match the documentation, in this case. --- clutter/clutter-animator.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/clutter/clutter-animator.c b/clutter/clutter-animator.c index a03e09db7..3b6596d3d 100644 --- a/clutter/clutter-animator.c +++ b/clutter/clutter-animator.c @@ -1326,9 +1326,11 @@ clutter_animator_get_keys (ClutterAnimator *animator, /** * clutter_animator_remove: - * @object: a #GObject to search for or NULL for all - * @property_name: a specific property name to query for or NULL for all - * @progress: a specific progress to search for or a negative value for all + * @object: (allow-none): a #GObject to search for, or %NULL for all + * @property_name: (allow-none): a specific property name to query for, + * or %NULL for all + * @progress: a specific progress to search for or a negative value + * for all * * Removes all keys matching the conditions specificed in the arguments. * @@ -1344,8 +1346,7 @@ clutter_animator_remove_key (ClutterAnimator *animator, GList *k; g_return_if_fail (CLUTTER_IS_ANIMATOR (animator)); - g_return_if_fail (G_IS_OBJECT (object)); - g_return_if_fail (property_name != NULL); + g_return_if_fail (object == NULL || G_IS_OBJECT (object)); property_name = g_intern_string (property_name);