> Modified: lyx-devel/trunk/src/BufferParams.cpp > URL: > http://www.lyx.org/trac/file/lyx-devel/trunk/src/BufferParams.cpp?rev=21925 > ============================================================================== > --- lyx-devel/trunk/src/BufferParams.cpp (original) > +++ lyx-devel/trunk/src/BufferParams.cpp Sun Dec 2 18:59:53 2007 > @@ -474,8 +474,10 @@ > 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 { >
If filepath.empty(), pp is addTextClass is not run. Will pp.first be undertermined? I think if pp.first should move into if (!filepath.empty()). Bo