summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--mdoc_action.c9
-rw-r--r--mdoc_validate.c4
2 files changed, 7 insertions, 6 deletions
diff --git a/mdoc_action.c b/mdoc_action.c
index f84542d4..49a87052 100644
--- a/mdoc_action.c
+++ b/mdoc_action.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_action.c,v 1.55 2010/05/12 08:41:17 kristaps Exp $ */
+/* $Id: mdoc_action.c,v 1.56 2010/05/14 15:26:39 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -366,9 +366,10 @@ post_st(POST_ARGS)
assert(MDOC_TEXT == n->child->type);
p = mdoc_a2st(n->child->string);
- assert(p);
- free(n->child->string);
- n->child->string = mandoc_strdup(p);
+ if (p != NULL) {
+ free(n->child->string);
+ n->child->string = mandoc_strdup(p);
+ }
return(1);
}
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 5d264dac..46470b79 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.73 2010/05/14 14:34:29 kristaps Exp $ */
+/* $Id: mdoc_validate.c,v 1.74 2010/05/14 15:26:39 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -1162,7 +1162,7 @@ post_st(POST_ARGS)
if (mdoc_a2st(mdoc->last->child->string))
return(1);
- return(mdoc_nerr(mdoc, mdoc->last, EBADSTAND));
+ return(mdoc_nwarn(mdoc, mdoc->last, EBADSTAND));
}