From b4266fed6f78aed41fddd99ce60e3af6f4a5621c Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Fri, 18 Nov 2011 16:39:08 +0000 Subject: Convert an assert into an explicit check. man_unscope can be triggered on unknown macros. --- man_macro.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man_macro.c b/man_macro.c index 2aff0f2e..7a9d33b9 100644 --- a/man_macro.c +++ b/man_macro.c @@ -120,7 +120,8 @@ man_unscope(struct man *m, const struct man_node *to, assert(to); - assert(MAN_ROOT != m->last->type); + if (MAN_ROOT != m->last->type) + return(0); m->next = MAN_NEXT_SIBLING; /* LINTED */ -- cgit