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
This commit is contained in:
Vincent van Ravesteijn 2009-08-16 00:21:02 +00:00
parent c0dac43600
commit 263c012d4b

View 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();