From: Emden Gansner Date: Mon, 23 May 2016 17:51:16 +0000 (-0400) Subject: Fix bug 2599: fdp produces unnecessarily large clusters X-Git-Tag: TRAVIS_CI_BUILD_EXPERIMENTAL~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=060e2687abdd532c34de96d002a23a59a26712d8;p=graphviz Fix bug 2599: fdp produces unnecessarily large clusters --- diff --git a/lib/fdpgen/layout.c b/lib/fdpgen/layout.c index 7b333a6df..e85bff86c 100644 --- a/lib/fdpgen/layout.c +++ b/lib/fdpgen/layout.c @@ -893,8 +893,10 @@ void layout(graph_t * g, layout_info * infop) cc = pg = findCComp(dg, &c_cnt, &pinned); while ((cg = *pg++)) { + node_t* nxtnode; fdp_tLayout(cg, &xpms); - for (n = agfstnode(cg); n; n = agnxtnode(cg, n)) { + for (n = agfstnode(cg); n; n = nxtnode) { + nxtnode = agnxtnode(cg, n); if (ND_clust(n)) { pointf pt; sg = expandCluster(n, cg); /* attach ports to sg */