]> git.lyx.org Git - lyx.git/blobdiff - src/dociterator.C
* output_plaintext.C: cosmetics in comment: line length cannot be < 0
[lyx.git] / src / dociterator.C
index 7221d1438cf51c0404f76b513d8ac19e8a8322e3..bb72fb6c2d71c669dffc61b936fc3a36c9e4beaa 100644 (file)
@@ -274,11 +274,12 @@ void DocIterator::forwardPos(bool ignorecollapsed)
                return;
        }
 
+       InsetBase * const nextinset = nextInset();
        // jump over collapsables if they are collapsed
        // FIXME: the check for asInsetMath() shouldn't be necessary
        // but math insets do not return a sensible editable() state yet.
-       if (ignorecollapsed && nextInset() && (!nextInset()->asInsetMath()
-           && nextInset()->editable() != InsetBase::HIGHLY_EDITABLE)) {
+       if (ignorecollapsed && nextinset && (!nextinset->asInsetMath()
+           && nextinset->editable() != InsetBase::HIGHLY_EDITABLE)) {
                ++top().pos();
                return;
        }