From a7e1aac652f81fc61840ad4750d97eb2548d763b Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sun, 26 Apr 2009 22:52:22 +0000 Subject: [PATCH] Don't try to load a nonexisting file when executing server-goto-file-row as this leads to a crash. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29418 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/LyXFunc.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp index 4c1d579c42..5892a27cd5 100644 --- a/src/LyXFunc.cpp +++ b/src/LyXFunc.cpp @@ -1090,10 +1090,13 @@ void LyXFunc::dispatch(FuncRequest const & cmd) // Either change buffer or load the file if (theBufferList().exists(s)) buf = theBufferList().getBuffer(s); - else { + else if (s.exists()) { buf = lyx_view_->loadDocument(s); loaded = true; - } + } else + lyx_view_->message(bformat( + _("File does not exist: %1$s"), + makeDisplayPath(file_name))); } if (!buf) { -- 2.39.2