From: Enrico Forestieri Date: Sun, 26 Apr 2009 22:52:22 +0000 (+0000) Subject: Don't try to load a nonexisting file when executing server-goto-file-row X-Git-Tag: 2.0.0~6746 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a7e1aac652f81fc61840ad4750d97eb2548d763b;p=features.git 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 --- 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) {