From d0506a912e7424ab9a7c8293784c680d0964963c Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 25 Jul 2017 11:51:49 +0200 Subject: [PATCH] Check whether a class is known before loading it Fixes bug #10719. (cherry picked from commit 15a87dd3a86235848983022ecb7927675a62d4e3) --- src/tex2lyx/Preamble.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp index 6dcbd5097c..15b41e65cb 100644 --- a/src/tex2lyx/Preamble.cpp +++ b/src/tex2lyx/Preamble.cpp @@ -1937,7 +1937,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); }