From: Vincent van Ravesteijn Date: Sun, 16 Aug 2009 00:21:02 +0000 (+0000) Subject: Fix a crash when closing LyX while a master and a dirty child were open, and if the... X-Git-Tag: 2.0.0~5701 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=263c012d4b0d27789aa5daa7dfe9304996f682a0;p=lyx.git 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 --- 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();