Add check for recursive includes.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@39330 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2011-07-16 13:50:06 +00:00
parent c45d7b69bc
commit 966eaec1c2
2 changed files with 8 additions and 0 deletions

View File

@ -2568,6 +2568,10 @@ void Buffer::collectChildren(ListOfBuffers & clist, bool grand_children) const
// there might be grandchildren
child->collectChildren(clist, true);
}
// Make sure we have not included ourselves.
ListOfBuffers::iterator bit = find(clist.begin(), clist.end(), this);
if (bit != clist.end())
clist.erase(bit);
}

View File

@ -156,6 +156,10 @@ What's new
- Fix output of unicode math from within child documents (bug 7682).
- Added a check for recursive includes that should prevent some of the
crashes we see in such cases.
* USER INTERFACE
- Fixed crash relating to outliner and mouse movement.