From 4dfa4de5d01bf5817c939c23d738967e6f8922df Mon Sep 17 00:00:00 2001 From: Nitin Sharma Date: Mon, 13 Jul 2015 17:21:57 +0530 Subject: [PATCH] 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. --- clutter/clutter-actor.c | 13 ++++++++----- 1 file 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);