From: Fletcher T. Penney Date: Wed, 1 Nov 2017 12:26:50 +0000 (-0400) Subject: UPDATED: Silence analyzer warnings X-Git-Tag: 6.2.3^2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6be0ebcd20eb6722e424d00167ff5592e8c6536;p=multimarkdown UPDATED: Silence analyzer warnings --- diff --git a/Sources/libMultiMarkdown/fodt.c b/Sources/libMultiMarkdown/fodt.c index 5158174..5f3b61a 100644 --- a/Sources/libMultiMarkdown/fodt.c +++ b/Sources/libMultiMarkdown/fodt.c @@ -261,7 +261,9 @@ void mmd_export_link_odf(DString * out, const char * source, token * text, link text->child->next->len++; } - mmd_export_token_tree_odf(out, source, text->child, scratch); + if (text && text->child) { + mmd_export_token_tree_odf(out, source, text->child, scratch); + } print_const(""); } diff --git a/Sources/libMultiMarkdown/latex.c b/Sources/libMultiMarkdown/latex.c index 73cf534..f8728bb 100644 --- a/Sources/libMultiMarkdown/latex.c +++ b/Sources/libMultiMarkdown/latex.c @@ -292,7 +292,9 @@ void mmd_export_link_latex(DString * out, const char * source, token * text, lin text->child->next->len++; } - mmd_export_token_tree_latex(out, source, text->child, scratch); + if (text && text->child) { + mmd_export_token_tree_latex(out, source, text->child, scratch); + } print_const("}"); diff --git a/Sources/libMultiMarkdown/opendocument-content.c b/Sources/libMultiMarkdown/opendocument-content.c index 1ef47da..964e26e 100644 --- a/Sources/libMultiMarkdown/opendocument-content.c +++ b/Sources/libMultiMarkdown/opendocument-content.c @@ -452,7 +452,7 @@ void mmd_export_link_opendocument(DString * out, const char * source, token * te text->child->next->len++; } - if (text) { + if (text && text->child) { mmd_export_token_tree_opendocument(out, source, text->child, scratch); }