Check whether a class is known before loading it

Fixes bug #10719.
This commit is contained in:
Jean-Marc Lasgouttes 2017-07-25 11:51:49 +02:00
parent 5e2a9e32c4
commit 15a87dd3a8

View File

@ -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);
}