From: Emden R. Gansner Date: Sun, 17 May 2015 19:47:41 +0000 (-0400) Subject: The fix for bug 2471 wasn't complete, as dot can pass a virtual edge into X-Git-Tag: TRAVIS_CI_BUILD_EXPERIMENTAL~113 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c0a15948841db1e769efd848a75c2ff93a4f8c86;p=graphviz The fix for bug 2471 wasn't complete, as dot can pass a virtual edge into makeStraightEdges, which assumes that the first edge is real so it can find the actual head node. --- diff --git a/lib/dotgen/dotsplines.c b/lib/dotgen/dotsplines.c index 110bce38d..1999df59d 100644 --- a/lib/dotgen/dotsplines.c +++ b/lib/dotgen/dotsplines.c @@ -413,7 +413,19 @@ static void _dot_splines(graph_t * g, int normalize) } if (et == ET_CURVED) { - makeStraightEdges (g, edges+ind, cnt, et, &sinfo); + int ii; + edge_t* e0; + edge_t** edgelist; + if (cnt == 1) + edgelist = &e0; + else + edgelist = N_NEW(cnt, edge_t*); + edgelist[0] = getmainedge((edges+ind)[0]); + for (ii = 1; ii < cnt; ii++) + edgelist[ii] = (edges+ind)[ii]; + makeStraightEdges (g, edgelist, cnt, et, &sinfo); + if (cnt > 1) + free (edgelist); } else if (agtail(e0) == aghead(e0)) { int b, sizey, r;