mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-28 14:58:36 +00:00
* 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:
parent
ed8a3a4f91
commit
cb0bfc9445
@ -2659,9 +2659,12 @@ string Buffer::getDefaultOutputFormat() const
|
|||||||
if (isDocBook()
|
if (isDocBook()
|
||||||
|| isLiterate()
|
|| isLiterate()
|
||||||
|| params().useXetex
|
|| params().useXetex
|
||||||
|| params().encoding().package() == Encoding::japanese)
|
|| params().encoding().package() == Encoding::japanese) {
|
||||||
|
if (formats.empty())
|
||||||
|
return string();
|
||||||
// return the first we find
|
// return the first we find
|
||||||
return formats.front()->name();
|
return formats.front()->name();
|
||||||
|
}
|
||||||
return lyxrc.default_view_format;
|
return lyxrc.default_view_format;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user