]> git.lyx.org Git - lyx.git/blobdiff - src/Cursor.cpp
Fix crash noticed by Bennett:
[lyx.git] / src / Cursor.cpp
index 3edf97065d34c4965be9b023a66cd07f503a36cb..b8d1b9fe57f63464190b43d09079aa4da50f9de6 100644 (file)
@@ -2002,7 +2002,7 @@ Encoding const * Cursor::getEncoding() const
        CursorSlice const & sl = innerTextSlice();
        Text const & text = *sl.text();
        Font font = text.getPar(sl.pit()).getFont(
-               bv().buffer().params(), sl.pos(), outerFont(sl.pit(), text.paragraphs()));
+               bv().buffer().params(), sl.pos(), text.outerFont(sl.pit()));
        return font.language()->encoding();
 }
 
@@ -2059,7 +2059,7 @@ Font Cursor::getFont() const
        
        // get font at the position
        Font font = par.getFont(buffer()->params(), pos,
-               outerFont(sl.pit(), text.paragraphs()));
+               text.outerFont(sl.pit()));
 
        return font;
 }