summaryrefslogtreecommitdiffstats
path: root/read.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-03-31 10:54:39 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-03-31 10:54:39 +0000
commitf0962178f803a13106e8714b7d1b1940e38083d5 (patch)
tree4a6ef78c1a852483106bbb60d68a8f373f624266 /read.c
parentdad21424d313db36275c9afb45d655b5c41ca9d9 (diff)
downloadmandoc-f0962178f803a13106e8714b7d1b1940e38083d5.tar.gz
Allow a NULL mmsg passed to libmandoc.
Diffstat (limited to 'read.c')
-rw-r--r--read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/read.c b/read.c
index 27aaf8d2..bc7d2071 100644
--- a/read.c
+++ b/read.c
@@ -740,7 +740,8 @@ mandoc_msg(enum mandocerr er, struct mparse *m,
if (level < m->wlevel)
return;
- (*m->mmsg)(er, level, m->file, ln, col, msg);
+ if (m->mmsg)
+ (*m->mmsg)(er, level, m->file, ln, col, msg);
if (m->file_status < level)
m->file_status = level;