]> git.lyx.org Git - lyx.git/blobdiff - src/lyxtextclass.C
fix reading the author field.
[lyx.git] / src / lyxtextclass.C
index d4f943dc3bfc3abe4337f050b8d5fb47c33a5a58..168520301dfa345535120f4a6dec85d789450db4 100644 (file)
@@ -845,16 +845,16 @@ bool LyXTextClass::load() const
 
        // Read style-file
        string const real_file = LibFileSearch("layouts", name_, "layout");
+       loaded_ = const_cast<LyXTextClass*>(this)->Read(real_file) == 0;
 
-       if (const_cast<LyXTextClass*>(this)->Read(real_file)) {
+       if (!loaded_) {
                lyxerr << "Error reading `"
                       << MakeDisplayPath(real_file)
                       << "'\n(Check `" << name_
                       << "')\nCheck your installation and "
                        "try Options/Reconfigure..." << endl;
-               loaded_ = false;
        }
-       loaded_ = true;
+
        return loaded_;
 }