]> git.lyx.org Git - features.git/commitdiff
Check whether a class is known before loading it
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 25 Jul 2017 09:51:49 +0000 (11:51 +0200)
committerRichard Heck <rgheck@lyx.org>
Fri, 29 Dec 2017 22:13:47 +0000 (17:13 -0500)
Fixes bug #10719.

(cherry picked from commit 15a87dd3a86235848983022ecb7927675a62d4e3)

src/tex2lyx/Preamble.cpp

index 6dcbd5097c6ee4204a7c68b34d9515760c48aaf8..15b41e65cb5a04a4f3236d85dd6f5aa909d0a94c 100644 (file)
@@ -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);
        }