diff --git a/source/xml_parser.c b/source/xml_parser.c index 62ea0ae58..7675bff30 100644 --- a/source/xml_parser.c +++ b/source/xml_parser.c @@ -161,8 +161,10 @@ int s_advance_to_closing_tag( AWS_PRECONDITION(node); if (node->is_empty) { - out_body->ptr = NULL; - out_body->len = 0; + if (out_body) { + out_body->ptr = NULL; + out_body->len = 0; + } return AWS_OP_SUCCESS; }