From 966eaec1c2c641cfad1e705519e4aaa4b337c34d Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 16 Jul 2011 13:50:06 +0000 Subject: [PATCH] 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 --- src/Buffer.cpp | 4 ++++ status.20x | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 238225bcb3..f3d76b98ef 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -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); } diff --git a/status.20x b/status.20x index 3c86fa10f4..ff0c72e406 100644 --- a/status.20x +++ b/status.20x @@ -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. -- 2.39.5