mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
I am pretty sure we do not want duplicates here. What's worse, recursive
includes could crash this if we allow them. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35534 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2f1af8892b
commit
6a85b8a96e
@ -2527,6 +2527,10 @@ void Buffer::getChildren(ListOfBuffers & clist, bool grand_children) const
|
||||
Impl::BufferPositionMap::iterator end = d->children_positions.end();
|
||||
for (; it != end; ++it) {
|
||||
Buffer * child = const_cast<Buffer *>(it->first);
|
||||
// No duplicates
|
||||
ListOfBuffers::const_iterator bit = find(clist.begin(), clist.end(), child);
|
||||
if (bit != clist.end())
|
||||
continue;
|
||||
clist.push_back(child);
|
||||
if (grand_children)
|
||||
// there might be grandchildren
|
||||
|
Loading…
Reference in New Issue
Block a user