From: Juergen Spitzmueller Date: Sun, 15 Apr 2018 10:37:41 +0000 (+0200) Subject: Simplify X-Git-Tag: lyx-2.4.0dev-acb2ca7b~3624 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6f2eda8a0c0014971aa79cbc5c3c26fb05687911;p=features.git Simplify --- diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 9dfd0938f4..4df4481ee4 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -3401,9 +3401,8 @@ bool Paragraph::needsCProtection() const // now check whether we have insets that need cprotection pos_type size = d->text_.size(); for (pos_type i = 0; i < size; ++i) - if (isInset(i)) - if (getInset(i)->needsCProtection()) - return true; + if (isInset(i) && getInset(i)->needsCProtection()) + return true; return false; }