]> granicus.if.org Git - graphviz/commitdiff
fix strdup of null pointer
authorellson <devnull@localhost>
Tue, 17 Jun 2008 16:30:37 +0000 (16:30 +0000)
committerellson <devnull@localhost>
Tue, 17 Jun 2008 16:30:37 +0000 (16:30 +0000)
lib/common/htmltable.c

index 784bcbad08a0846533a68045a71e9ccf0580a063..f1215d9a068fab0a6ec0f7367e994b5e65441969 100644 (file)
@@ -1764,7 +1764,7 @@ int make_html_label(graph_t *g, textlabel_t * lp, void *obj)
     }
 
     if (lbl->kind == HTML_TBL) {
-       if (! lbl->u.tbl->data.pencolor)
+       if (! lbl->u.tbl->data.pencolor && getPenColor(obj))
            lbl->u.tbl->data.pencolor = strdup(getPenColor(obj));
        rv |= size_html_tbl(g, lbl->u.tbl, NULL, &env);
        wd2 = (lbl->u.tbl->data.box.UR.x + 1) / 2;