avoid crash when calling inset_modify with cursor not in table

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33687 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Edwin Leuven 2010-03-09 19:07:54 +00:00
parent 42a2a0f289
commit 93830fd28d

View File

@ -3979,6 +3979,12 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
status.setEnabled(false);
break;
}
if (&cur.inset() != this) {
// we need the cursor to be _inside_ the table.
status.setEnabled(false);
status.message(from_utf8(N_("Cursor not in table")));
return true;
}
is >> s;
// FIXME: We only check for the very first argument...
int action = Tabular::LAST_ACTION;