From 08935a7b2a3438f1dc0a6fbe5d93adafced5dbc3 Mon Sep 17 00:00:00 2001 From: "Fletcher T. Penney" Date: Sat, 18 Mar 2017 08:32:51 -0400 Subject: [PATCH] FIXED: Fix potential crash in definitions --- Sources/libMultiMarkdown/html.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Sources/libMultiMarkdown/html.c b/Sources/libMultiMarkdown/html.c index 1e54f6c..62b4f57 100644 --- a/Sources/libMultiMarkdown/html.c +++ b/Sources/libMultiMarkdown/html.c @@ -409,10 +409,13 @@ void mmd_export_token_html(DString * out, const char * source, token * t, scratc print_const("
"); temp_short = scratch->list_is_tight; - if (!(t->child->next && (t->child->next->type == BLOCK_EMPTY) && t->child->next->next)) - scratch->list_is_tight = true; + if (t->child) { + if (!(t->child->next && (t->child->next->type == BLOCK_EMPTY) && t->child->next->next)) + scratch->list_is_tight = true; + + mmd_export_token_tree_html(out, source, t->child, scratch); + } - mmd_export_token_tree_html(out, source, t->child, scratch); print_const("
"); scratch->padded = 0; -- 2.50.1