mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
Don't access empty iterators.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33033 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
02124ea00e
commit
22b1ef0295
@ -342,6 +342,14 @@ XHTMLStream & XHTMLStream::operator<<(EndTag const & etag)
|
|||||||
{
|
{
|
||||||
if (etag.tag_.empty())
|
if (etag.tag_.empty())
|
||||||
return *this;
|
return *this;
|
||||||
|
|
||||||
|
// make sure there are tags to be closed
|
||||||
|
if (tag_stack_.empty()) {
|
||||||
|
writeError("Tried to close `" + etag.tag_
|
||||||
|
+ "' when no tags were open!");
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
// first make sure we're not closing an empty tag
|
// first make sure we're not closing an empty tag
|
||||||
if (!pending_tags_.empty()) {
|
if (!pending_tags_.empty()) {
|
||||||
StartTag const & stag = pending_tags_.back();
|
StartTag const & stag = pending_tags_.back();
|
||||||
|
Loading…
Reference in New Issue
Block a user