From 263c012d4b0d27789aa5daa7dfe9304996f682a0 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Sun, 16 Aug 2009 00:21:02 +0000 Subject: [PATCH] Fix a crash when closing LyX while a master and a dirty child were open, and if the dirty child is the first tab. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31073 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 564d6e52b9..df9986b29e 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -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(); -- 2.39.2