]> granicus.if.org Git - graphviz/commitdiff
Make sure jobs have been created before assigning to local variables.
authorerg <devnull@localhost>
Fri, 4 Aug 2006 21:36:21 +0000 (21:36 +0000)
committererg <devnull@localhost>
Fri, 4 Aug 2006 21:36:21 +0000 (21:36 +0000)
lib/gvc/gvc.c

index ee758a3d82a65fe0f1e22b70959dc229e37907fa..920620eb0c280f0fb66929e682aeb32110c8ec67 100644 (file)
@@ -87,13 +87,15 @@ int gvLayout(GVC_t *gvc, graph_t *g, char *engine)
 int gvRender(GVC_t *gvc, graph_t *g, char *format, FILE *out)
 {
     int rc;
-    GVJ_t *job = gvc->job;
-    GVJ_t *firstjob = gvc->active_jobs;
+    GVJ_t *job;
+    GVJ_t *firstjob;
 
     g = g->root;
 
     /* create a job for the required format */
     rc = gvjobs_output_langname(gvc, format);
+    job = gvc->job;
+    firstjob = gvc->active_jobs;
     if (rc == NO_SUPPORT) {
         agerr (AGERR, "Renderer type: \"%s\" not recognized. Use one of:%s\n",
                 format, gvplugin_list(gvc, API_render, format));