]> git.lyx.org Git - features.git/commitdiff
- coordOffset(): add an assertion on par.rows() emptiness before accessing it and...
authorAbdelrazak Younes <younes@lyx.org>
Sun, 12 Nov 2006 11:03:55 +0000 (11:03 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sun, 12 Nov 2006 11:03:55 +0000 (11:03 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15876 a592a061-630c-0410-9148-cb99ea01b6c8

src/bufferview_funcs.C

index d5dec9c6c60f0996e677bf65fddae6a372449841..99f5a8a46c58beeac8d7e8bdcad01a9a168ca01f 100644 (file)
@@ -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;