]> granicus.if.org Git - graphviz/commitdiff
restore io disclipline back to default immediately after use, incase
authorellson <devnull@localhost>
Wed, 11 Mar 2009 11:53:43 +0000 (11:53 +0000)
committerellson <devnull@localhost>
Wed, 11 Mar 2009 11:53:43 +0000 (11:53 +0000)
something else calls agwrite  (what?)

plugin/core/gvrender_core_dot.c

index c77e8f97edd9323079d2fbfd778bb456099a89f0..30e45acf848e2ac6e6739a5fd0eddfa284ff95d5 100644 (file)
@@ -34,6 +34,7 @@
 #include "gvplugin_device.h"
 #include "agxbuf.h"
 #include "utils.h"
+#include "gvio.h"
 
 #define GNEW(t)          (t*)malloc(sizeof(t))
 
@@ -413,6 +414,7 @@ static void dot_end_graph(GVJ_t *job)
 {
     graph_t *g = job->obj->u.g;
 
+    agsetiodisc(NULL, gvfwrite, gvferror);
     switch (job->render.id) {
        case FORMAT_PLAIN:
            write_plain(job, g, (FILE*)job, FALSE);
@@ -431,6 +433,7 @@ static void dot_end_graph(GVJ_t *job)
                agwrite(g, (FILE*)job);
            break;
     }
+    agsetiodisc(NULL, NULL, NULL);
 }
 
 static void xdot_textpara(GVJ_t * job, pointf p, textpara_t * para)