summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mandocdb.c b/mandocdb.c
index a2f1c884..4dcb5ac6 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1198,8 +1198,9 @@ mpages_merge(struct mchars *mc, struct mparse *mp)
goto nextpage;
} else if (NULL != mdoc) {
mpage->form = FORM_SRC;
- mpage->sec =
- mandoc_strdup(mdoc_meta(mdoc)->msec);
+ mpage->sec = mdoc_meta(mdoc)->msec;
+ mpage->sec = mandoc_strdup(
+ NULL == mpage->sec ? "" : mpage->sec);
mpage->arch = mdoc_meta(mdoc)->arch;
mpage->arch = mandoc_strdup(
NULL == mpage->arch ? "" : mpage->arch);