Add missing check for nullptr on check of language encoding of next paragraph.

This commit is contained in:
Stephan Witt 2020-02-18 09:03:20 +01:00
parent f904fb2d61
commit fc790bc1f5

View File

@ -1378,7 +1378,8 @@ void TeXOnePar(Buffer const & buf,
if (nextpar && state->open_encoding_ == CJK
&& bparams.encoding().iconvName() != "UTF-8"
&& bparams.encoding().package() != Encoding::CJK
&& (nextpar_language->encoding()->package() != Encoding::CJK
&& ((nextpar_language &&
nextpar_language->encoding()->package() != Encoding::CJK)
|| (nextpar->layout().isEnvironment() && nextpar->isMultiLingual(bparams)))
// inbetween environments, CJK has to be closed later (nesting!)
&& (!style.isEnvironment() || !nextpar->layout().isEnvironment())) {