]> git.cameronkatri.com Git - mandoc.git/commitdiff
oops, don't crash when .Fo has no argument
authorIngo Schwarze <schwarze@openbsd.org>
Sat, 11 Oct 2014 21:34:04 +0000 (21:34 +0000)
committerIngo Schwarze <schwarze@openbsd.org>
Sat, 11 Oct 2014 21:34:04 +0000 (21:34 +0000)
mdoc_validate.c

index f2e85a363103b469c6ff5102333785048afb9ccf..10839980a8c906d51005164d0d498a1d38d56c86 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: mdoc_validate.c,v 1.250 2014/10/11 21:14:16 schwarze Exp $ */
+/*     $Id: mdoc_validate.c,v 1.251 2014/10/11 21:34:04 schwarze Exp $ */
 /*
  * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -1030,7 +1030,7 @@ post_fo(POST_ARGS)
 
        hwarn_eq1(mdoc);
        bwarn_ge1(mdoc);
-       if (mdoc->last->type == MDOC_HEAD)
+       if (mdoc->last->type == MDOC_HEAD && mdoc->last->nchild)
                post_fname(mdoc);
        return(1);
 }