From: Vincent van Ravesteijn Date: Mon, 5 Jan 2009 00:00:19 +0000 (+0000) Subject: Fix crash when no new document can be created. X-Git-Tag: 2.0.0~7502 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=cc3b9c61cfbe73de9d8bf8b36f8a1ad9b16c7ee7;p=lyx.git Fix crash when no new document can be created. This occurs frequently when the temporary directory cannot be created because it already exists. The temporary directory can exist as a result of previous crashes of LyX. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27991 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 483f7a0f53..a5b5bf942e 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -1624,7 +1624,8 @@ void GuiView::newDocument(string const & filename, bool from_template) if (b) setBuffer(b); // Ensure the cursor is correctly positionned on screen. - view()->showCursor(); + if (view()) + view()->showCursor(); }