mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 18:24:48 +00:00
Check whether a class is known before loading it
Fixes bug #10719.
(cherry picked from commit 15a87dd3a8
)
This commit is contained in:
parent
02b248d270
commit
d0506a912e
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user