]> git.lyx.org Git - features.git/commitdiff
Add missing check for nullptr on check of language encoding of next paragraph.
authorStephan Witt <switt@lyx.org>
Tue, 18 Feb 2020 08:03:20 +0000 (09:03 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:52 +0000 (15:48 +0200)
src/output_latex.cpp

index 8a6ed8f4e5230501c7b5a3a0e1f99ea75f27c6bc..4aa797b98b8c91ab7ce93a38e4a7cfb2ef4a22c5 100644 (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())) {