X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fbufferview_funcs.C;h=bd47dcefa772b240c6c7cb34ab2f44c302a6a175;hb=35204f8f33d7400a5fefeffea533fb4cb4097211;hp=99f5a8a46c58beeac8d7e8bdcad01a9a168ca01f;hpb=3e82675c318997e600072a4744f001b7da63d5fc;p=lyx.git diff --git a/src/bufferview_funcs.C b/src/bufferview_funcs.C index 99f5a8a46c..bd47dcefa7 100644 --- a/src/bufferview_funcs.C +++ b/src/bufferview_funcs.C @@ -177,7 +177,9 @@ Point coordOffset(BufferView const & bv, DocIterator const & dit, // Add contribution of initial rows of outermost paragraph CursorSlice const & sl = dit[0]; Paragraph const & par = sl.text()->getPar(sl.pit()); - // FIXME: I wonder if a case exists where this could happen: + if (par.rows().empty()) + // FIXME: The special case below happens for empty paragraph creation + const_cast(sl.text())->redoParagraph(const_cast(bv), sl.pit()); BOOST_ASSERT(!par.rows().empty()); y -= par.rows()[0].ascent(); #if 1