From: erg Date: Wed, 30 Nov 2005 22:19:52 +0000 (+0000) Subject: Prevent core dump when a cluster has no label to be used as a tooltip. X-Git-Tag: LAST_LIBGRAPH~32^2~6937 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7d5fa586cfbe20cc1173d93f74c9c9a2a6821e3f;p=graphviz Prevent core dump when a cluster has no label to be used as a tooltip. --- diff --git a/lib/common/emit.c b/lib/common/emit.c index 65994c3d8..baa0b9c6e 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -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)