From: John Ellson Date: Tue, 25 Sep 2012 14:09:14 +0000 (-0400) Subject: fix crash with -Tx11 because X11 device doesn't support layers. X-Git-Tag: LAST_LIBGRAPH~32^2~299^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7fdf1a8c8834831e677157033b872076b79c2e4a;p=graphviz fix crash with -Tx11 because X11 device doesn't support layers. --- diff --git a/lib/common/emit.c b/lib/common/emit.c index 11e2de9f8..e68446fc3 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -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, '_'); }