animator: Zero the AnimatorKey:value member
The test suite is showing random segfaults because the GValue member of AnimatorKey is not zero-ed on creation.
This commit is contained in:
parent
d62ddc374f
commit
4d9327bbe1
@ -349,6 +349,7 @@ clutter_animator_key_new (ClutterAnimator *animator,
|
|||||||
animator_key->animator = animator;
|
animator_key->animator = animator;
|
||||||
animator_key->object = object;
|
animator_key->object = object;
|
||||||
animator_key->mode = mode;
|
animator_key->mode = mode;
|
||||||
|
memset (&(animator_key->value), 0, sizeof (GValue));
|
||||||
animator_key->progress = progress;
|
animator_key->progress = progress;
|
||||||
animator_key->property_name = g_intern_string (property_name);
|
animator_key->property_name = g_intern_string (property_name);
|
||||||
animator_key->interpolation = CLUTTER_INTERPOLATION_LINEAR;
|
animator_key->interpolation = CLUTTER_INTERPOLATION_LINEAR;
|
||||||
@ -1297,7 +1298,6 @@ parse_animator_property (JsonArray *array,
|
|||||||
ClutterAnimatorKey *animator_key;
|
ClutterAnimatorKey *animator_key;
|
||||||
gdouble progress;
|
gdouble progress;
|
||||||
gulong mode;
|
gulong mode;
|
||||||
GValue *value;
|
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
|
||||||
progress = json_array_get_double_element (key, 0);
|
progress = json_array_get_double_element (key, 0);
|
||||||
@ -1308,9 +1308,9 @@ parse_animator_property (JsonArray *array,
|
|||||||
pname,
|
pname,
|
||||||
progress,
|
progress,
|
||||||
mode);
|
mode);
|
||||||
value = &animator_key->value;
|
|
||||||
res = clutter_script_parse_node (clos->script,
|
res = clutter_script_parse_node (clos->script,
|
||||||
value,
|
&(animator_key->value),
|
||||||
pname,
|
pname,
|
||||||
json_array_get_element (key, 2),
|
json_array_get_element (key, 2),
|
||||||
pspec);
|
pspec);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user