From: John Ellson Date: Wed, 15 Aug 2012 17:09:19 +0000 (-0400) Subject: add missing calls to agbindrec() after agread() X-Git-Tag: LAST_LIBGRAPH~32^2~350 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8998971ae5a1338cb49d95aedf7521f0fc2d4c27;p=graphviz add missing calls to agbindrec() after agread() --- diff --git a/tclpkg/tcldot/tcldot.c b/tclpkg/tcldot/tcldot.c index ff3339a40..83530209a 100644 --- a/tclpkg/tcldot/tcldot.c +++ b/tclpkg/tcldot/tcldot.c @@ -93,13 +93,13 @@ static int dotnew(ClientData clientData, Tcl_Interp * interp, #endif i = 2; } -#ifdef WITH_CGRAPH - agbindrec(g, "Agraphinfo_t", sizeof(Agraphinfo_t), TRUE); -#endif if (!g) { Tcl_AppendResult(interp, "\nFailure to open graph.", NULL); return TCL_ERROR; } +#ifdef WITH_CGRAPH + agbindrec(g, "Agraphinfo_t", sizeof(Agraphinfo_t), TRUE); +#endif #ifndef WITH_CGRAPH *gp = g; AGID(g) = id; @@ -240,6 +240,9 @@ static int dotread(ClientData clientData, Tcl_Interp * interp, } return TCL_ERROR; } +#ifdef WITH_CGRAPH + agbindrec(g, "Agraphinfo_t", sizeof(Agraphinfo_t), TRUE); +#endif if (agerrors()) { Tcl_AppendResult(interp, "\nSyntax errors in file \"", argv[1], " \"", NULL); return TCL_ERROR; @@ -292,6 +295,9 @@ static int dotstring(ClientData clientData, Tcl_Interp * interp, } return TCL_ERROR; } +#ifdef WITH_CGRAPH + agbindrec(g, "Agraphinfo_t", sizeof(Agraphinfo_t), TRUE); +#endif if (agerrors()) { Tcl_AppendResult(interp, "\nSyntax errors in string \"", argv[1], " \"", NULL); return TCL_ERROR;