diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/commonmark.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commonmark.c b/src/commonmark.c index cc12bb4..cb926c5 100644 --- a/src/commonmark.c +++ b/src/commonmark.c @@ -146,7 +146,8 @@ static bool is_autolink(cmark_node *node) { if (strcmp((const char *)url, "mailto:") == 0) { url += 7; } - return strcmp((const char *)url, (char *)link_text->data) == 0; + return link_text->data != NULL && + strcmp((const char *)url, (char *)link_text->data) == 0; } // if node is a block node, returns node. |