]> granicus.if.org Git - graphviz/commitdiff
add missing calls to agbindrec() after agread()
authorJohn Ellson <ellson@research.att.com>
Wed, 15 Aug 2012 17:09:19 +0000 (13:09 -0400)
committerJohn Ellson <ellson@research.att.com>
Wed, 15 Aug 2012 17:09:19 +0000 (13:09 -0400)
tclpkg/tcldot/tcldot.c

index ff3339a400be42ecc3ed7c497146b8b9149b5144..83530209a2ed9bafc82d784b5fb0d4b23a0d5deb 100644 (file)
@@ -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;