aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/HtmlSearch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/HtmlSearch.c b/src/HtmlSearch.c
index cdd4759..f1631a7 100644
--- a/src/HtmlSearch.c
+++ b/src/HtmlSearch.c
@@ -402,6 +402,9 @@ static int html_parse_callback(HtmlParser *html_parser, HtmlParseType parse_type
case HTML_PARSE_TEXT:
/* fallthrough */
case HTML_PARSE_JAVASCRIPT_CODE: {
+ if(html_parser->text_stripped.size == 0)
+ return 0;
+
QuickMediaHtmlChildNode *child_node = malloc(sizeof(QuickMediaHtmlChildNode));
if(!child_node)
return 1;