branch: Avoid crash due to an infinite recursive loop when inset is NULL. Backport of r28242

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@28245 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-01-18 15:30:31 +00:00
parent 215f4cbe12
commit 3e8ce1cd0b

View File

@ -886,12 +886,13 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd)
case LFUN_COPY_LABEL_AS_REF: {
// if there is an inset at cursor, see whether it
// handles the lfun, other start from scratch
// handles the lfun
Inset * inset = cur.nextInset();
if (!inset || !inset->getStatus(cur, cmd, flag))
flag = lyx::getStatus(cmd);
flag.setEnabled(false);
break;
}
case LFUN_NEXT_INSET_TOGGLE:
case LFUN_NEXT_INSET_MODIFY: {
// this is the real function we want to invoke