]> git.lyx.org Git - lyx.git/commitdiff
Fix crash when no new document can be created.
authorVincent van Ravesteijn <vfr@lyx.org>
Mon, 5 Jan 2009 00:00:19 +0000 (00:00 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Mon, 5 Jan 2009 00:00:19 +0000 (00:00 +0000)
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

src/frontends/qt4/GuiView.cpp

index 483f7a0f531a82602c32d205c1bc8b9daa1f70ea..a5b5bf942edfe0487cb82890e657269cc8682a38 100644 (file)
@@ -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();
 }