From: erg Date: Thu, 7 May 2009 21:24:48 +0000 (+0000) Subject: Fix font string bug in htmltable. Only strdup a color string if non-NULL X-Git-Tag: LAST_LIBGRAPH~32^2~2110 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c36bf2aa2a1d5382ddac91752048dc6ba70cfa97;p=graphviz Fix font string bug in htmltable. Only strdup a color string if non-NULL --- diff --git a/lib/common/htmltable.c b/lib/common/htmltable.c index 79230656c..10833a735 100644 --- a/lib/common/htmltable.c +++ b/lib/common/htmltable.c @@ -246,7 +246,7 @@ static void doBorder(GVJ_t * job, char *color, int border, boxf BF) gvrender_begin_context(job); if (!color) - color = "black"; + color = DEFAULT_COLOR; gvrender_set_fillcolor(job, color); gvrender_set_pencolor(job, color); @@ -1457,7 +1457,7 @@ static void pos_html_tbl(htmltbl_t * tbl, boxf pos, int sides) htmlcell_t *cp; boxf cbox; - if (tbl->u.n.parent && !tbl->data.pencolor) + if (tbl->u.n.parent && tbl->u.n.parent->data.pencolor && !tbl->data.pencolor) tbl->data.pencolor = strdup (tbl->u.n.parent->data.pencolor); oldsz = tbl->data.box.UR.x;