]> git.lyx.org Git - lyx.git/commitdiff
tiny optimisation.
authorAbdelrazak Younes <younes@lyx.org>
Thu, 11 Jan 2007 18:25:11 +0000 (18:25 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 11 Jan 2007 18:25:11 +0000 (18:25 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16652 a592a061-630c-0410-9148-cb99ea01b6c8

src/dociterator.C

index 7221d1438cf51c0404f76b513d8ac19e8a8322e3..5b43b853103b561260605973871c9a3d2ac497d7 100644 (file)
@@ -274,11 +274,12 @@ void DocIterator::forwardPos(bool ignorecollapsed)
                return;
        }
 
+       InsetBase * 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;
        }