From 22de2326e9de80b06fc96e504ada74dc274e1abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Tue, 15 Apr 2008 17:00:53 +0000 Subject: [PATCH] fix crash on application desctruction git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24273 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiWorkArea.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index f286152b09..5558ef716d 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -1352,6 +1352,9 @@ bool TabWorkArea::removeWorkArea(GuiWorkArea * work_area) void TabWorkArea::on_currentTabChanged(int i) { + // returns e.g. on application destruction + if (i == -1) + return; GuiWorkArea * wa = dynamic_cast(widget(i)); LASSERT(wa, /**/); BufferView & bv = wa->bufferView();