diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp
index e87fe23750..252b1d1705 100644
--- a/src/output_xhtml.cpp
+++ b/src/output_xhtml.cpp
@@ -347,7 +347,7 @@ bool XHTMLStream::closeFontTags()
tag_stack_.pop_back();
// this shouldn't happen, since then the font tags
// weren't in any other tag.
- LBUFERR(!tag_stack_.empty());
+ LASSERT(!tag_stack_.empty(), return true);
curtag = tag_stack_.back();
}