if (pos() == 0)
return 0;
if (inMathed())
- return prevAtom().nucleus();
+ if (cell().empty())
+ // FIXME: this should not happen but it does.
+ // See bug 3189
+ // http://bugzilla.lyx.org/show_bug.cgi?id=3189
+ return 0;
+ else
+ return prevAtom().nucleus();
return paragraph().isInset(pos() - 1) ? paragraph().getInset(pos() - 1) : 0;
}
if (pos() == 0)
return 0;
if (inMathed())
- return prevAtom().nucleus();
+ if (cell().empty())
+ // FIXME: this should not happen but it does.
+ // See bug 3189
+ // http://bugzilla.lyx.org/show_bug.cgi?id=3189
+ return 0;
+ else
+ return prevAtom().nucleus();
return paragraph().isInset(pos() - 1) ? paragraph().getInset(pos() - 1) : 0;
}
return;
}
- InsetBase * nextinset = nextInset();
+ 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.