diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2014-08-27 11:45:03 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2014-08-27 11:45:03 +0200 |
commit | 533ed6a9690d988871a20cddc73aa31830f93e38 (patch) | |
tree | 341ab1a165c2cbbfd172905213ddc1914e6f6ef6 /ufo/ufo-graph.c | |
parent | ab23fa00533159bd1a48170d2ac0850b600de0cf (diff) |
Fix #33: ref to-be-copied node
Diffstat (limited to 'ufo/ufo-graph.c')
-rw-r--r-- | ufo/ufo-graph.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ufo/ufo-graph.c b/ufo/ufo-graph.c index 92fcf00..aafc58d 100644 --- a/ufo/ufo-graph.c +++ b/ufo/ufo-graph.c @@ -763,6 +763,15 @@ ufo_graph_expand (UfoGraph *graph, /* The first link goes from the original head */ current = orig; + /* + * Fix for #33: In case we duplicate a single node we have to reference the + * to-be-copied object a second time. It is still not clear _why_ it is + * unreffed twice. + */ + if (g_list_length (path) == 3) { + g_object_ref (G_OBJECT (g_list_next (head)->data)); + } + for (GList *it = g_list_next (head); it != tail; it = g_list_next (it)) { UfoNode *next; UfoNode *copy; |