]> granicus.if.org Git - graphviz/commitdiff
Prevent core dump when a cluster has no label to be used as a tooltip.
authorerg <devnull@localhost>
Wed, 30 Nov 2005 22:19:52 +0000 (22:19 +0000)
committererg <devnull@localhost>
Wed, 30 Nov 2005 22:19:52 +0000 (22:19 +0000)
lib/common/emit.c

index 65994c3d81bceaab2b6c493f788bce243096644b..baa0b9c6ec87dd5aed862314570534c46b0c4cdb 100644 (file)
@@ -1439,7 +1439,7 @@ void emit_clusters(GVJ_t * job, Agraph_t * g, int flags)
        if ((s = agget(sg, "tooltip")) && s[0]) {
            tooltip = strdup_and_subst_graph(s, sg);
            explicit_tooltip++;
-       } else {
+       } else if (GD_label(sg)) {
            tooltip = strdup_and_subst_graph(GD_label(sg)->text, sg);
        }
        if (url || explicit_tooltip)