]> granicus.if.org Git - graphviz/commitdiff
Fix font string bug in htmltable. Only strdup a color string if non-NULL
authorerg <devnull@localhost>
Thu, 7 May 2009 21:24:48 +0000 (21:24 +0000)
committererg <devnull@localhost>
Thu, 7 May 2009 21:24:48 +0000 (21:24 +0000)
lib/common/htmltable.c

index 79230656ca2480148a875767e9d4ea56ad4c5c67..10833a735cc059ea6a39721bceba3e8a385a8972 100644 (file)
@@ -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;