script: Fix a segfault
Accessing a variable before it is being set is not a great plan.
This commit is contained in:
parent
37d94c6b87
commit
9f0ba2da0f
@ -2000,7 +2000,7 @@ _clutter_script_construct_object (ClutterScript *script,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
GList *properties = oinfo->properties;
|
GList *properties = oinfo->properties;
|
||||||
GParameter *parameters = (GParameter *) (void *) params->data;
|
GParameter *parameters;
|
||||||
|
|
||||||
/* every other object: first, we get the construction parameters */
|
/* every other object: first, we get the construction parameters */
|
||||||
oinfo->properties =
|
oinfo->properties =
|
||||||
@ -2010,6 +2010,7 @@ _clutter_script_construct_object (ClutterScript *script,
|
|||||||
properties,
|
properties,
|
||||||
¶ms);
|
¶ms);
|
||||||
|
|
||||||
|
parameters = (GParameter *) (void *) params->data;
|
||||||
oinfo->object = g_object_newv (oinfo->gtype,
|
oinfo->object = g_object_newv (oinfo->gtype,
|
||||||
params->len,
|
params->len,
|
||||||
parameters);
|
parameters);
|
||||||
|
Loading…
Reference in New Issue
Block a user