Replace crash with assertion failure if we attempt to xref a non-existent
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Thu, 17 Feb 2005 21:41:59 +0000 (21:41 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Thu, 17 Feb 2005 21:41:59 +0000 (21:41 +0000)
name.

git-svn-id: svn://svn.tartarus.org/sgt/halibut@5336 cda61777-01e9-0310-a592-d414129be87e

bk_html.c

index 5babfda..ce1dc4a 100644 (file)
--- a/bk_html.c
+++ b/bk_html.c
@@ -1625,8 +1625,12 @@ static void html_words(htmloutput *ho, word *words, int flags,
       case word_LowerXref:
        if (flags & LINKS) {
            keyword *kwl = kw_lookup(keywords, w->text);
-           paragraph *p = kwl->para;
-           htmlsect *s = (htmlsect *)p->private_data;
+           paragraph *p;
+           htmlsect *s;
+
+           assert(kwl);
+           p = kwl->para;
+           s = (htmlsect *)p->private_data;
 
            assert(s);