]> granicus.if.org Git - graphviz/commitdiff
fix breakage to gvRender() in language bindings
authorellson <devnull@localhost>
Sat, 6 May 2006 12:32:07 +0000 (12:32 +0000)
committerellson <devnull@localhost>
Sat, 6 May 2006 12:32:07 +0000 (12:32 +0000)
lib/gvc/gvrender.c

index 58445f93740026987b490a5e5074bacb4489cbe1..791d3c07a5f92cd2828ab8b0440a82252ee6f285 100644 (file)
@@ -126,9 +126,15 @@ void gvrender_begin_job(GVJ_t * job)
 {
     GVC_t *gvc = job->gvc;
     gvrender_engine_t *gvre = job->render.engine;
-    job->input_filename = gvc->gvg->input_filename;
+    if (gvc->gvg) {
+        job->input_filename = gvc->gvg->input_filename;
+       job->graph_index = gvc->gvg->graph_index;
+    }
+    else {
+        job->input_filename = NULL;
+       job->graph_index = 0;
+    }
     job->layout_type = gvc->layout.type;
-    job->graph_index = gvc->gvg->graph_index;
     job->bb = gvc->bb;
     if (gvre) {
         if (gvre->begin_job)