From: Jean-Marc Lasgouttes Date: Tue, 25 Jul 2017 09:51:49 +0000 (+0200) Subject: Check whether a class is known before loading it X-Git-Tag: 2.3.0beta1~134 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=15a87dd3a86235848983022ecb7927675a62d4e3;p=features.git Check whether a class is known before loading it Fixes bug #10719. --- diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp index b383793cf0..ea315dd156 100644 --- a/src/tex2lyx/Preamble.cpp +++ b/src/tex2lyx/Preamble.cpp @@ -2018,7 +2018,7 @@ void Preamble::parse(Parser & p, string const & forceclass, if (!forceclass.empty()) h_textclass = forceclass; tc.setName(h_textclass); - if (!tc.load()) { + if (!LayoutFileList::get().haveClass(h_textclass) || !tc.load()) { cerr << "Error: Could not read layout file for textclass \"" << h_textclass << "\"." << endl; exit(EXIT_FAILURE); }