]> granicus.if.org Git - graphviz/commitdiff
Zero out Agraphinfo_t on *_cleanup_graph so that graph can be
authorerg <devnull@localhost>
Wed, 1 Feb 2006 17:30:17 +0000 (17:30 +0000)
committererg <devnull@localhost>
Wed, 1 Feb 2006 17:30:17 +0000 (17:30 +0000)
passed to gvLayout again with core dumping.

lib/circogen/circularinit.c
lib/dotgen/dotinit.c
lib/fdpgen/fdpinit.c
lib/neatogen/neatoinit.c
lib/twopigen/twopiinit.c

index 76fb62cee9d5a9de23259b24bd6fe1702532e32c..2348f8157814a4b73f6af361d68b51070761de10 100644 (file)
@@ -340,4 +340,5 @@ void circo_cleanup(graph_t * g)
        circular_cleanup_node(n);
     }
     free(GD_neato_nlist(g));
+    memset(&(g->u), 0, sizeof(Agraphinfo_t));
 }
index 8b6c64d463cccdf273e04c0c293fef4ae70e446f..dbd71edf727b4ab71083bd482e60a6f254cb4d21 100644 (file)
@@ -157,6 +157,7 @@ dot_cleanup_graph(graph_t * g)
 
     for (c = 1; c <= GD_n_cluster(g); c++) {
        clust = GD_clust(g)[c];
+       GD_cluster_was_collapsed(clust) = FALSE;
        dot_cleanup(clust);
     }
 
@@ -166,6 +167,7 @@ dot_cleanup_graph(graph_t * g)
            free(GD_rank(g)[i].v);
        free(GD_rank(g));
     }
+    memset(&(g->u), 0, sizeof(Agraphinfo_t));
 }
 
 /* delete the layout (but retain the underlying graph) */
index 0c043fedb63aa5d4ecc1f0e31549958a2f97735f..57e7ed88c645428a45440dd568b23698f499a5f7 100644 (file)
@@ -177,6 +177,7 @@ static void fdp_cleanup_graph(graph_t * g)
     cleanup_subgs(g);
     free(GD_neato_nlist(g));
     free(GD_alg(g));
+    memset(&(g->u), 0, sizeof(Agraphinfo_t));
 }
 
 void fdp_cleanup(graph_t * g)
index a949f1b5407a2365afdf323e4d3b9bb1facf74cb..eb3b5bb8ec34c8500ac048be2e1fa54273c1a6a9 100644 (file)
@@ -177,6 +177,7 @@ void neato_cleanup_graph(graph_t * g)
 {
     if (Nop || (Pack < 0))
        free_scan_graph(g);
+    memset(&(g->u), 0, sizeof(Agraphinfo_t));
 }
 
 void neato_cleanup(graph_t * g)
index c22fcae18e0441c3766d174f90944e2a9ca79857..1cb4726d3577b41be914acc0c4ff3081970923a6 100644 (file)
@@ -155,6 +155,7 @@ static void twopi_cleanup_edge(edge_t * e)
 static void twopi_cleanup_graph(graph_t * g)
 {
     free(GD_neato_nlist(g));
+    memset(&(g->u), 0, sizeof(Agraphinfo_t));
 }
 
 void twopi_cleanup(graph_t * g)