commit b365a471124d63017beabeb5c3ae84ce00c7f350 Author: Jean-Marc Lasgouttes <lasgout...@lyx.org> Date: Sun Feb 20 17:22:07 2022 +0100
Avoid null pointer dereference Spotted by coverity. In the real world, getInset should never return nullptr when isInset is true. --- src/Paragraph.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 3a4c399..9a1171f 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -2367,8 +2367,8 @@ int Paragraph::Private::startTeXParParams(BufferParams const & bparams, && !layout_->pass_thru && curAlign != LYX_ALIGN_CENTER) { if (!owner_->empty() - && (owner_->isInset(0) - && owner_->getInset(0)->lyxCode() == VSPACE_CODE)) + && owner_->getInset(0) + && owner_->getInset(0)->lyxCode() == VSPACE_CODE) // If the paragraph starts with a vspace, the \\noindent // needs to come after that (as it leaves vmode). // If the paragraph consists only of the vspace, -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs