]> granicus.if.org Git - graphviz/commitdiff
Fix so that graph picks up ProtoGraph attributes even if it none itself.
authorerg <devnull@localhost>
Sat, 11 Jul 2009 15:38:51 +0000 (15:38 +0000)
committererg <devnull@localhost>
Sat, 11 Jul 2009 15:38:51 +0000 (15:38 +0000)
lib/cgraph/graph.c

index d2507daf8ecd6375143b8897ced0ec2fcf8c6b94..0d071d93045dcfe4d0f291dc80e3d1951840008a 100644 (file)
@@ -82,7 +82,7 @@ Agraph_t *agopen1(Agraph_t * g)
        AGSEQ(g) = agnextseq(par, AGRAPH);
        dtinsert(par->g_dict, g);
     }                          /* else AGSEQ=0 */
-    if (g->desc.has_attrs)
+    if (!par || par->desc.has_attrs)
        agraphattr_init(g);
     agmethod_init(g, g);
     return g;