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;
}
MathArray const & DocIterator::cell() const
{
- BOOST_ASSERT(inMathed());
+// BOOST_ASSERT(inMathed());
return top().cell();
}
MathArray & DocIterator::cell()
{
- BOOST_ASSERT(inMathed());
+// BOOST_ASSERT(inMathed());
return top().cell();
}