actor: Check for NULL pointer for pspec

In function clutter_actor_set_final_state, the pspec pointer returned by calling
g_object_class_find_property is not checked for NULL.
This commit is contained in:
Nitin Sharma 2015-07-13 17:21:57 +05:30 committed by Emmanuele Bassi
parent 332aa3cf21
commit 4dfa4de5d0

View File

@ -15056,13 +15056,16 @@ clutter_actor_set_final_state (ClutterAnimatable *animatable,
pspec = g_object_class_find_property (obj_class, property_name);
if ((pspec->flags & CLUTTER_PARAM_ANIMATABLE) != 0)
if (pspec != NULL)
{
/* XXX - I'm going to the special hell for this */
clutter_actor_set_animatable_property (actor, pspec->param_id, final, pspec);
if ((pspec->flags & CLUTTER_PARAM_ANIMATABLE) != 0)
{
/* XXX - I'm going to the special hell for this */
clutter_actor_set_animatable_property (actor, pspec->param_id, final, pspec);
}
else
g_object_set_property (G_OBJECT (animatable), pspec->name, final);
}
else
g_object_set_property (G_OBJECT (animatable), pspec->name, final);
}
g_free (p_name);