From 15a87dd3a86235848983022ecb7927675a62d4e3 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. --- 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 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); } -- 2.39.2