From: Emden R. Gansner Date: Fri, 28 Feb 2014 15:52:38 +0000 (-0500) Subject: Fix gv.rm function on graphs to just call agclose(). X-Git-Tag: 2.38.0~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=460e5a53582114efa5fe0b3f557ad078b2787c46;p=graphviz Fix gv.rm function on graphs to just call agclose(). --- diff --git a/tclpkg/gv/gv.cpp b/tclpkg/gv/gv.cpp index 56435f617..23e13568c 100644 --- a/tclpkg/gv/gv.cpp +++ b/tclpkg/gv/gv.cpp @@ -767,13 +767,20 @@ bool rm(Agraph_t *g) if (!g) return false; +#if 0 Agraph_t* sg; for (sg = agfstsubg (g); sg; sg = agnxtsubg (sg)) rm(sg); if (g == agroot(g)) agclose(g); else - agdelete(agroot(g), g); + agdelete(agparent(g), g); +#endif + /* The rm function appears to have the semantics of agclose, so + * we should just do that, and let cgraph take care of all the + * details. + */ + agclose(g); return true; }