From: Emden R. Gansner Date: Sun, 14 Feb 2016 21:00:21 +0000 (-0500) Subject: Fix bug in twopi where a node attribute "root" is not defined. This never X-Git-Tag: TRAVIS_CI_BUILD_EXPERIMENTAL~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e192ddc9cdbd0d64eacd1604b6d57e1c26387fb;p=graphviz Fix bug in twopi where a node attribute "root" is not defined. This never worked. --- diff --git a/lib/twopigen/twopiinit.c b/lib/twopigen/twopiinit.c index ff9ea1165..341d14085 100644 --- a/lib/twopigen/twopiinit.c +++ b/lib/twopigen/twopiinit.c @@ -123,7 +123,7 @@ void twopi_layout(Agraph_t * g) if (ncc == 1) { if (ctr) lctr = ctr; - else if (!(lctr = findRootNode(g, rootattr))) + else if (!rootattr || !(lctr = findRootNode(g, rootattr))) lctr = 0; c = circleLayout(g, lctr); if (setRoot && !ctr) @@ -144,7 +144,7 @@ void twopi_layout(Agraph_t * g) sg = ccs[i]; if (ctr && agcontains(sg, ctr)) lctr = ctr; - else if (!(lctr = findRootNode(sg, rootattr))) + else if (!rootattr || !(lctr = findRootNode(sg, rootattr))) lctr = 0; nodeInduce(sg); c = circleLayout(sg, lctr);