]> granicus.if.org Git - graphviz/commitdiff
Fix bug 2327
authorEmden R. Gansner <erg@gentoo.research.att.com>
Fri, 23 Aug 2013 01:56:20 +0000 (21:56 -0400)
committerEmden R. Gansner <erg@gentoo.research.att.com>
Fri, 23 Aug 2013 01:56:20 +0000 (21:56 -0400)
cmd/tools/gvpack.c

index b085510dc585b58f51611023656c286405f14796..52f16ed96e6bfd74e153e4b8bf34fa2973a15810 100644 (file)
@@ -899,6 +899,10 @@ static Agraph_t **readGraphs(int *cp, GVC_t* gvc)
     while ((g = nextGraph(&ig)) != 0) {
        if (verbose)
            fprintf(stderr, "Reading graph %s\n", agnameof(g));
+       if (agnnodes(g) == 0) {
+           fprintf(stderr, "Graph %s is empty - ignoring\n", agnameof(g));
+           continue;
+       }
        if (cnt >= sz) {
            sz += nGraphs;
            gs = ALLOC(sz, gs, Agraph_t *);