From: Fletcher T. Penney Date: Sat, 18 Mar 2017 12:32:51 +0000 (-0400) Subject: FIXED: Fix potential crash in definitions X-Git-Tag: 6.0.0-rc2^2~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=08935a7b2a3438f1dc0a6fbe5d93adafced5dbc3;p=multimarkdown FIXED: Fix potential crash in definitions --- 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;