]> granicus.if.org Git - multimarkdown/commitdiff
UPDATED: Silence analyzer warnings
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Wed, 1 Nov 2017 12:26:50 +0000 (08:26 -0400)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Wed, 1 Nov 2017 12:26:50 +0000 (08:26 -0400)
Sources/libMultiMarkdown/fodt.c
Sources/libMultiMarkdown/latex.c
Sources/libMultiMarkdown/opendocument-content.c

index 51581746e9374b3f850d461ccb4c393d2e9c3343..5f3b61ae5d7bd5515c1c8a0bf1b2b3641da73614 100644 (file)
@@ -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("</text:a>");
 }
index 73cf534f510ef8d6ac2c9f2e48347a489b238c29..f8728bbeddddfc1461dd6fe575bc9ef32ae8419a 100644 (file)
@@ -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("}");
 
index 1ef47da851738d6cc884d0391380f23c7ce67286..964e26ebdeaf0fea1bc5e7e78f8d12062705c185 100644 (file)
@@ -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);
        }