From faec7838222e5314ade3d89a3fadce731b93d759 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 11 Sep 2020 00:39:41 +0200 Subject: [PATCH] XML: bad fix for a crash that only happened in XHTML. As an error is output, I suppose that this behaviour is OK. --- src/xml.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xml.cpp b/src/xml.cpp index 8e936f817e..dda39a4f3f 100644 --- a/src/xml.cpp +++ b/src/xml.cpp @@ -477,7 +477,8 @@ XMLStream &XMLStream::operator<<(xml::EndTag const &etag) + "' when other tags were pending. Last pending tag is `" + to_utf8(pending_tags_.back()->writeTag()) + "'. Tag discarded."); - pending_tags_.erase(dit); + if (!pending_tags_.empty()) + pending_tags_.erase(dit); return *this; } } -- 2.39.2