mirror of
https://github.com/brl/mutter.git
synced 2025-01-11 12:12:25 +00:00
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->object = object;
|
||||
animator_key->mode = mode;
|
||||
memset (&(animator_key->value), 0, sizeof (GValue));
|
||||
animator_key->progress = progress;
|
||||
animator_key->property_name = g_intern_string (property_name);
|
||||
animator_key->interpolation = CLUTTER_INTERPOLATION_LINEAR;
|
||||
@ -1297,7 +1298,6 @@ parse_animator_property (JsonArray *array,
|
||||
ClutterAnimatorKey *animator_key;
|
||||
gdouble progress;
|
||||
gulong mode;
|
||||
GValue *value;
|
||||
gboolean res;
|
||||
|
||||
progress = json_array_get_double_element (key, 0);
|
||||
@ -1308,9 +1308,9 @@ parse_animator_property (JsonArray *array,
|
||||
pname,
|
||||
progress,
|
||||
mode);
|
||||
value = &animator_key->value;
|
||||
|
||||
res = clutter_script_parse_node (clos->script,
|
||||
value,
|
||||
&(animator_key->value),
|
||||
pname,
|
||||
json_array_get_element (key, 2),
|
||||
pspec);
|
||||
|
Loading…
Reference in New Issue
Block a user