=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/tbl.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- src/usr.bin/mandoc/tbl.c 2015/01/26 00:54:09 1.14 +++ src/usr.bin/mandoc/tbl.c 2015/01/27 05:20:30 1.15 @@ -1,4 +1,4 @@ -/* $OpenBSD: tbl.c,v 1.14 2015/01/26 00:54:09 schwarze Exp $ */ +/* $OpenBSD: tbl.c,v 1.15 2015/01/27 05:20:30 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011, 2015 Ingo Schwarze @@ -171,11 +171,15 @@ tbl_end(struct tbl_node **tblp) { struct tbl_node *tbl; + struct tbl_span *sp; tbl = *tblp; *tblp = NULL; - if (NULL == tbl->first_span || NULL == tbl->first_span->first) + sp = tbl->first_span; + while (sp != NULL && sp->first == NULL) + sp = sp->next; + if (sp == NULL) mandoc_msg(MANDOCERR_TBLNODATA, tbl->parse, tbl->line, tbl->pos, NULL);