diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-01-17 21:43:38 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-01-17 21:43:38 -0800 |
commit | 047e65d0b05f601bd0a6fafb4f4eab98659c1529 (patch) | |
tree | f3c4b013dbfc1dd5f1b6f35889f51a670e1b33df | |
parent | c50061bd0359ee1822b08a7c18ee4adf55d6fb1d (diff) |
commonmark: is_autolink - handle case where link has no children.
-rw-r--r-- | src/commonmark.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/commonmark.c b/src/commonmark.c index 4fb9cec..751a5df 100644 --- a/src/commonmark.c +++ b/src/commonmark.c @@ -126,6 +126,9 @@ static bool is_autolink(cmark_node *node) { } link_text = node->first_child; + if (link_text == NULL) { + return false; + } cmark_consolidate_text_nodes(link_text); realurl = (char *)url->data; realurllen = url->len; |