From 047e65d0b05f601bd0a6fafb4f4eab98659c1529 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 17 Jan 2016 21:43:38 -0800 Subject: commonmark: is_autolink - handle case where link has no children. --- src/commonmark.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/commonmark.c') 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; -- cgit v1.2.3