fix crash on application desctruction

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24273 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2008-04-15 17:00:53 +00:00
parent 27dd040f6d
commit 22de2326e9

View File

@ -1352,6 +1352,9 @@ bool TabWorkArea::removeWorkArea(GuiWorkArea * work_area)
void TabWorkArea::on_currentTabChanged(int i) void TabWorkArea::on_currentTabChanged(int i)
{ {
// returns e.g. on application destruction
if (i == -1)
return;
GuiWorkArea * wa = dynamic_cast<GuiWorkArea *>(widget(i)); GuiWorkArea * wa = dynamic_cast<GuiWorkArea *>(widget(i));
LASSERT(wa, /**/); LASSERT(wa, /**/);
BufferView & bv = wa->bufferView(); BufferView & bv = wa->bufferView();