mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
Add check for recursive includes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39328 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d89d60c5a7
commit
1f820d11a2
@ -2640,6 +2640,12 @@ void Buffer::collectChildren(ListOfBuffers & clist, bool grand_children) const
|
|||||||
// there might be grandchildren
|
// there might be grandchildren
|
||||||
child->collectChildren(clist, true);
|
child->collectChildren(clist, true);
|
||||||
}
|
}
|
||||||
|
// Make sure we have not included ourselves.
|
||||||
|
ListOfBuffers::iterator bit = find(clist.begin(), clist.end(), this);
|
||||||
|
if (bit != clist.end()) {
|
||||||
|
LYXERR0("Recursive include detected in `" << fileName() << "'.");
|
||||||
|
clist.erase(bit);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user