]> git.lyx.org Git - features.git/commitdiff
Fix a crash when closing LyX while a master and a dirty child were open, and if the...
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 16 Aug 2009 00:21:02 +0000 (00:21 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 16 Aug 2009 00:21:02 +0000 (00:21 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31073 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index 564d6e52b9634f187212639f7f38f38714b92c3c..df9986b29e7fab6bc735549aab8417e6a54110bb 100644 (file)
@@ -604,7 +604,7 @@ bool GuiView::closeBufferAll(bool tolastopened)
                if (twa->count() == 0)
                        ++empty_twa;
 
-               for (; twa_count; --twa_count) {
+               for (; twa == d.tabWorkArea(empty_twa) && twa_count; --twa_count) {
                        twa->setCurrentIndex(twa_count-1);
 
                        GuiWorkArea * wa = twa->currentWorkArea();