commit 6f2eda8a0c0014971aa79cbc5c3c26fb05687911
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Sun Apr 15 12:37:41 2018 +0200

    Simplify
---
 src/Paragraph.cpp |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 9dfd093..4df4481 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;
 }

Reply via email to