From 94d391b183796f885cefbf100b4a5d5ddcdf513b Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Thu, 21 Sep 2006 07:57:45 +0000 Subject: [PATCH] Fix a crash when lyx2lyx failed to convert LyX file. * src/buffer.C (Buffer::readFile): Only call updateDocLang if reading the file succeeded git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@15093 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/buffer.C | 5 +++-- status.14x | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/buffer.C b/src/buffer.C index a0a75ff500..0bbf3aa77a 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -556,14 +556,15 @@ bool Buffer::readFile(string const & filename) paragraphs().clear(); LyXLex lex(0, 0); lex.setFile(filename); - bool ret = readFile(lex, filename); + if (!readFile(lex, filename)) + return false; // After we have read a file, we must ensure that the buffer // language is set and used in the gui. // If you know of a better place to put this, please tell me. (Lgb) updateDocLang(params().language); - return ret; + return true; } diff --git a/status.14x b/status.14x index d9da1fa208..3ad0347788 100644 --- a/status.14x +++ b/status.14x @@ -47,6 +47,8 @@ What's new - Fix a crash when a used bibtex file is in a non-readable directory (bug 2782). +- Fix a crash when lyx2lyx failed to convert LyX file. + - Ignore the definition of LyXgreyout environment when re-importing a LyX-generated LaTeX file (part of bug 2420).