From: Abdelrazak Younes Date: Sun, 12 Nov 2006 11:03:55 +0000 (+0000) Subject: - coordOffset(): add an assertion on par.rows() emptiness before accessing it and... X-Git-Tag: 1.6.10~11916 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3e82675c318997e600072a4744f001b7da63d5fc;p=features.git - coordOffset(): add an assertion on par.rows() emptiness before accessing it and a FIXME. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15876 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/bufferview_funcs.C b/src/bufferview_funcs.C index d5dec9c6c6..99f5a8a46c 100644 --- a/src/bufferview_funcs.C +++ b/src/bufferview_funcs.C @@ -177,6 +177,8 @@ 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: + BOOST_ASSERT(!par.rows().empty()); y -= par.rows()[0].ascent(); #if 1 size_t rend;