]> git.lyx.org Git - features.git/commitdiff
Fix bug #6603.
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Tue, 7 Dec 2010 21:31:31 +0000 (21:31 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Tue, 7 Dec 2010 21:31:31 +0000 (21:31 +0000)
The problem was that the child buffers were closed,
and therefore the TOC contained dangling pointers.
The fix is simple: Reopen all child docs and create a new TOC.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36766 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index 8585fb4cb1471ac8b62518517a0da8dba7822e86..6fb4f8af279bc4ec555619b01dc8a1e3e8b5eec0 100644 (file)
@@ -2497,6 +2497,11 @@ bool GuiView::closeBuffer(Buffer & buf)
                theBufferList().release(&buf);
                return true;
        }
+       // open all children again to avoid a crash (bug 6603)
+       // FIXME updateMacros() does more than needed
+       buf.updateMacros();
+       // get rid of dangling inset pointers in TOC (bug 6603)
+       buf.tocBackend().update();
        return false;
 }