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
This commit is contained in:
Enrico Forestieri 2009-04-26 22:52:22 +00:00
parent a8169a0139
commit a7e1aac652

View File

@ -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) {