From afa885378c15e0d5b0cd76a58d0826b18e35dd73 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Wed, 19 Aug 2009 10:45:23 +0000 Subject: [PATCH] branch: Fix bug #6158: Crash when entering math in tabular. We have to determine whether we are in an empty cell before we dispatch the lfun to the inset. Otherwise we determine whether the math is empty and if so, we then go to the next cell in the math inset. This cell doesn't exist probably. see r31121. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31139 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetTabular.cpp | 4 ++-- status.16x | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index c7f681edbd..dab5740307 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -3434,10 +3434,10 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) && cur.pos() == cur.lastpos()) || (!next_cell && cur.pit() == 0 && cur.pos() == 0)); + bool const empty_cell = cur.lastpos() == 0 && cur.lastpit() == 0; + // ...try to dispatch to the cell's inset. cell(cur.idx())->dispatch(cur, cmd); - - bool const empty_cell = cur.lastpos() == 0 && cur.lastpit() == 0; // When we already have a selection we want to select the whole cell // before going to the next cell. diff --git a/status.16x b/status.16x index 5b42faa3a2..ac03e6d578 100644 --- a/status.16x +++ b/status.16x @@ -209,6 +209,8 @@ What's new - Fix a crash when performing instant preview on an uncodable character (bug 6116). + +- Fix a crash when navigating in a table with math insets (bug 6158). - Fix communication between lyxclient and server, which leads to a crash once CTRL+D is used on the client side (bug 6106).