]> git.lyx.org Git - features.git/commit
This commit fixes a crash when accessing a math inset. This was due to an invalid...
authorAbdelrazak Younes <younes@lyx.org>
Tue, 17 Oct 2006 16:23:27 +0000 (16:23 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 17 Oct 2006 16:23:27 +0000 (16:23 +0000)
commit4cc7a7708e1753fc0ece02a9b8029ef1e9bd2921
treec40091d0309ad14b7ae4e381395aefb113663c15
parent52bd213992aeedde743ca8d794cddfe17a6893b9
This commit fixes a crash when accessing a math inset. This was due to an invalid CursorSlice::text() null pointer accessed in InsetMathNest::cursorPos():

    CoordCache & coord_cache = sl.text()->bv()->coordCache();

As you can see, I used this indirection to access the BufferView::CoordCache(). Bad luck, the passed CursorSlice was not completely valid inside a mathed inset, hence the crash. My solution is to pass BufferView to InsetBase::cursorPos() and all its derivative.

* InsetBase::cursorPos(): pass BufferView const &

* bufferview_funcs::coordOffset(): ditto.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15356 a592a061-630c-0410-9148-cb99ea01b6c8
21 files changed:
src/BufferView.C
src/bufferview_funcs.C
src/bufferview_funcs.h
src/cursor.C
src/insets/insetbase.C
src/insets/insetbase.h
src/insets/insetcaption.C
src/insets/insetcaption.h
src/insets/insetcollapsable.C
src/insets/insetcollapsable.h
src/insets/insettabular.C
src/insets/insettabular.h
src/insets/insettext.C
src/insets/insettext.h
src/mathed/InsetMathMBox.C
src/mathed/InsetMathMBox.h
src/mathed/InsetMathMacro.C
src/mathed/InsetMathMacro.h
src/mathed/InsetMathNest.C
src/mathed/InsetMathNest.h
src/mathed/MathSupport.h