summaryrefslogtreecommitdiffstats
path: root/tbl.c
diff options
context:
space:
mode:
Diffstat (limited to 'tbl.c')
-rw-r--r--tbl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tbl.c b/tbl.c
index 20ccb389..7019f4d2 100644
--- a/tbl.c
+++ b/tbl.c
@@ -173,11 +173,15 @@ void
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);