]> granicus.if.org Git - graphviz/commitdiff
fix crash with -Tx11 because X11 device doesn't support layers.
authorJohn Ellson <ellson@research.att.com>
Tue, 25 Sep 2012 14:09:14 +0000 (10:09 -0400)
committerJohn Ellson <ellson@research.att.com>
Tue, 25 Sep 2012 14:09:14 +0000 (10:09 -0400)
lib/common/emit.c

index 11e2de9f8b343257dea08ca42382e168fce86175..e68446fc3fd8410259925c0a7a422c9552d28b27 100644 (file)
@@ -179,7 +179,7 @@ static void
 layerPagePrefix (GVJ_t* job, agxbuf* xb)
 {
     char buf[128]; /* large enough for 2 decimal 64-bit ints and "page_," */
-    if (job->layerNum > 1) {
+    if (job->layerNum > 1 && (job->flags & GVDEVICE_DOES_LAYERS)) {
        agxbput (xb, job->gvc->layerIDs[job->layerNum]);
        agxbputc (xb, '_');
     }