[LyX/master] Add missing check for nullptr on check of language encoding of next paragraph.

Stephan Witt switt at lyx.org
Tue Feb 18 07:44:43 UTC 2020


commit fc790bc1f54c0c0175c3a5bd192211990f08fbb0
Author: Stephan Witt <switt at lyx.org>
Date:   Tue Feb 18 09:03:20 2020 +0100

    Add missing check for nullptr on check of language encoding of next paragraph.
---
 src/output_latex.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/output_latex.cpp b/src/output_latex.cpp
index 8a6ed8f..4aa797b 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())) {


More information about the lyx-cvs mailing list