From 97740523fe6debd90bd78f16eb0ca17d9d78d3ba Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Mon, 3 Nov 2008 08:25:59 +0000 Subject: [PATCH] * Fix for http://bugzilla.lyx.org/show_bug.cgi?id=5396 On Mac clicking on a LyX file in Finder might open another GuiView which is asked to open the file. The reload logic though closes this and the dispatcher will run into a current_view_ which is null (until the other GuiView gets the focus again). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27228 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiApplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 9bae4886e4..f79f25e178 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -848,7 +848,7 @@ bool GuiApplication::dispatch(FuncRequest const & cmd) crc = for_each(fname.begin(), fname.end(), crc); createView(crc.checksum()); current_view_->openDocument(fname); - if (!current_view_->buffer()) + if (current_view_ && !current_view_->buffer()) current_view_->close(); } else current_view_->openDocument(to_utf8(cmd.argument()));