summaryrefslogtreecommitdiff
path: root/clutter/clutter-actor.c
diff options
context:
space:
mode:
authorNitin Sharma <nitin.s1@samsung.com>2015-07-13 17:21:57 +0530
committerEmmanuele Bassi <ebassi@gnome.org>2015-07-13 13:15:52 +0100
commit4dfa4de5d01bf5817c939c23d738967e6f8922df (patch)
tree5f53928f42a8a763b6f5a5a82877eddd315461a0 /clutter/clutter-actor.c
parent332aa3cf215aa6b4c86565f589f01a4b4ac7e362 (diff)
downloadclutter-4dfa4de5d01bf5817c939c23d738967e6f8922df.tar.gz
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.
Diffstat (limited to 'clutter/clutter-actor.c')
-rw-r--r--clutter/clutter-actor.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index e01f376f9..60c852759 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -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);