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
|
||||
{
|
||||
GList *properties = oinfo->properties;
|
||||
GParameter *parameters = (GParameter *) (void *) params->data;
|
||||
GParameter *parameters;
|
||||
|
||||
/* every other object: first, we get the construction parameters */
|
||||
oinfo->properties =
|
||||
@ -2010,6 +2010,7 @@ _clutter_script_construct_object (ClutterScript *script,
|
||||
properties,
|
||||
¶ms);
|
||||
|
||||
parameters = (GParameter *) (void *) params->data;
|
||||
oinfo->object = g_object_newv (oinfo->gtype,
|
||||
params->len,
|
||||
parameters);
|
||||
|
Loading…
x
Reference in New Issue
Block a user