mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
fix part of ticket #6142: avoid a memory access error when an encoding is unkonwn
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31222 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a457aa2057
commit
eef60e5197
@ -154,7 +154,11 @@ Parser::~Parser()
|
||||
void Parser::setEncoding(std::string const & e)
|
||||
{
|
||||
Encoding const * enc = encodings.fromLaTeXName(e);
|
||||
//cerr << "setting encoding to " << enc->iconvName()<<std::endl;
|
||||
if (!enc) {
|
||||
cerr << "Unknown encoding " << e << ". Ignoring." << std::endl;
|
||||
return;
|
||||
}
|
||||
//cerr << "setting encoding to " << enc->iconvName() << std::endl;
|
||||
is_ << lyx::setEncoding(enc->iconvName());
|
||||
encoding_latex_ = e;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user