script: Take a copy of property nodes
Instead of counting on a JsonNode pointer to survive we should take a copy. This allows keeping unresolved properties across different ClutterScript passes.
This commit is contained in:
parent
4ad57aa3e4
commit
6e571928a4
@ -804,7 +804,7 @@ json_object_end (JsonParser *parser,
|
||||
pinfo = g_slice_new (PropertyInfo);
|
||||
|
||||
pinfo->name = g_strdup (name);
|
||||
pinfo->node = node;
|
||||
pinfo->node = json_node_copy (node);
|
||||
pinfo->pspec = NULL;
|
||||
|
||||
oinfo->properties = g_list_prepend (oinfo->properties, pinfo);
|
||||
@ -1618,6 +1618,9 @@ property_info_free (gpointer data)
|
||||
{
|
||||
PropertyInfo *pinfo = data;
|
||||
|
||||
if (pinfo->node)
|
||||
json_node_free (pinfo->node);
|
||||
|
||||
if (pinfo->pspec)
|
||||
g_param_spec_unref (pinfo->pspec);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user