]> git.lyx.org Git - features.git/commitdiff
* src/BufferParams.cpp (readToken):
authorJürgen Spitzmüller <spitz@lyx.org>
Sun, 2 Dec 2007 17:59:53 +0000 (17:59 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Sun, 2 Dec 2007 17:59:53 +0000 (17:59 +0000)
- fix assertion introduced with rev. 21800 (bug 4395).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21925 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferParams.cpp

index 44573db167afc572f96e556b24328c21411063e3..f13fb287bc222891debee435c61d6c53b75b33e3 100644 (file)
@@ -474,8 +474,10 @@ string const BufferParams::readToken(Lexer & lex, string const & token,
                string const classname = lex.getString();
                // if there exists a local layout file, ignore the system one
                // NOTE: in this case, the textclass (.cls file) is assumed to be available.
-               pair<bool, lyx::textclass_type> pp = textclasslist.addTextClass(
-                       classname, filepath.absFilename());
+               pair<bool, lyx::textclass_type> pp;
+               if (!filepath.empty())
+                       pp = textclasslist.addTextClass(
+                               classname, filepath.absFilename());
                if (pp.first)
                        setBaseClass(pp.second);
                else {