edge_t *ce;
item *ip;
+ if (IS_CLUST_NODE(h)) return;
tg = MAPC(t);
hg = MAPC(h);
if (!tg && !hg)
{
int rv;
node_t *n;
+ node_t *nxt;
edge_t *e;
graph_t *clg;
agxbuf xb;
clg = agsubg(g, "__clusternodes");
agxbinit(&xb, SMALLBUF, buf);
for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
+ if (IS_CLUST_NODE(n)) continue;
for (e = agfstout(g, n); e; e = agnxtout(g, e)) {
checkCompound(e, clg, &xb, map);
}
agxbfree(&xb);
dtclose(map);
rv = agnnodes(clg);
- for (n = agfstnode(clg); n; n = agnxtnode(clg, n)) {
+ for (n = agfstnode(clg); n; n = nxt) {
+ nxt = agnxtnode(clg, n);
agdelete(g, n);
}
agclose(clg);