* Buffer.cpp (getDefaultOutputFormat):

- prevent crash if no formats are found (and return an empty string).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29141 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2009-04-07 11:54:02 +00:00
parent ed8a3a4f91
commit cb0bfc9445

View File

@ -2659,9 +2659,12 @@ string Buffer::getDefaultOutputFormat() const
if (isDocBook()
|| isLiterate()
|| params().useXetex
|| params().encoding().package() == Encoding::japanese)
|| params().encoding().package() == Encoding::japanese) {
if (formats.empty())
return string();
// return the first we find
return formats.front()->name();
}
return lyxrc.default_view_format;
}