diff --git a/valid.c b/valid.c index 5fd40474..a8e79c59 100644 --- a/valid.c +++ b/valid.c @@ -5925,7 +5925,8 @@ child_ok: */ child = elem->children; while (child != NULL) { - if (child->type == XML_TEXT_NODE) { + if ((child->type == XML_TEXT_NODE) && + (child->content != NULL)) { const xmlChar *content = child->content; while (IS_BLANK_CH(*content))