From: Stephan Witt Date: Tue, 18 Feb 2020 08:03:20 +0000 (+0100) Subject: Add missing check for nullptr on check of language encoding of next paragraph. X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ea55160b6d7665ece04669d4e0b01bffbfd56498;p=features.git Add missing check for nullptr on check of language encoding of next paragraph. --- diff --git a/src/output_latex.cpp b/src/output_latex.cpp index 8a6ed8f4e5..4aa797b98b 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -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())) {