=================================================================== RCS file: /cvs/mandoc/mdoc_validate.c,v retrieving revision 1.177 retrieving revision 1.180 diff -u -p -r1.177 -r1.180 --- mandoc/mdoc_validate.c 2011/10/16 12:20:34 1.177 +++ mandoc/mdoc_validate.c 2011/12/02 01:37:14 1.180 @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.177 2011/10/16 12:20:34 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.180 2011/12/02 01:37:14 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011 Ingo Schwarze @@ -1694,6 +1694,14 @@ post_rs(POST_ARGS) } /* + * Nothing to sort if only invalid nodes were found + * inside the `Rs' body. + */ + + if (NULL == mdoc->last->child) + return(1); + + /* * The full `Rs' block needs special handling to order the * sub-elements according to `rsord'. Pick through each element * and correctly order it. This is a insertion sort. @@ -2076,7 +2084,7 @@ post_dt(POST_ARGS) * arch = NULL */ - cp = mdoc_a2msec(nn->string); + cp = mandoc_a2msec(nn->string); if (cp) { mdoc->meta.vol = mandoc_strdup(cp); mdoc->meta.msec = mandoc_strdup(nn->string);