]> granicus.if.org Git - graphviz/commitdiff
Empty clusters are ignored
authorEmden Gansner <erg@research.att.com>
Fri, 27 Jan 2012 20:59:23 +0000 (15:59 -0500)
committerEmden Gansner <erg@research.att.com>
Fri, 27 Jan 2012 20:59:23 +0000 (15:59 -0500)
lib/dotgen/rank.c

index 397e06a6773a4895742a88daa80d6ed759458f85..efb81efc8e0354c8a5861cf346ec7b95367177aa 100644 (file)
@@ -797,6 +797,8 @@ static void compile_samerank(graph_t * ug, graph_t * parent_clust)
     graph_t *clust;            /* cluster that contains the rankset */
     node_t *n, *leader;
 
+    if (is_empty(ug))
+       return;
     if (is_a_cluster(ug)) {
        clust = ug;
        if (parent_clust) {
@@ -807,8 +809,6 @@ static void compile_samerank(graph_t * ug, graph_t * parent_clust)
            GD_level(ug) = 0;
     } else
        clust = parent_clust;
-    if (is_empty(ug))
-       return;
 
     /* process subgraphs of this subgraph */
     for (s = agfstsubg(ug); s; s = agnxtsubg(s))