]> granicus.if.org Git - graphviz/commitdiff
generate errors message, instead of crashing, if layout
authorellson <devnull@localhost>
Thu, 14 Apr 2005 03:41:16 +0000 (03:41 +0000)
committerellson <devnull@localhost>
Thu, 14 Apr 2005 03:41:16 +0000 (03:41 +0000)
   not done because of unavable layout plugins.

lib/common/emit.c

index 9eeb9f0a57ec9af373f23bf9e907a9d24b3ae183..cba1dda907753375be54a2a42c2ad3d7c68a32ea 100644 (file)
@@ -1562,6 +1562,11 @@ static void emit_job(GVC_t * gvc, graph_t * g)
 {
     gvrender_job_t *job = gvc->job;
 
+    if (!GD_drawing(g)) {
+       fprintf (stderr,"layout was not done\n");
+       return;
+    }
+
 #ifndef DISABLE_CODEGENS
     Output_file = job->output_file;
     Output_lang = job->output_lang;