Cursor::insert(): Fix crash with math. Problem was that the inset pointer was released by MathAthom

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23363 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-02-29 20:55:56 +00:00
parent 7a6971bb28
commit f600486a37

View File

@ -1019,13 +1019,14 @@ void Cursor::insert(MathAtom const & t)
}
void Cursor::insert(Inset * inset)
void Cursor::insert(Inset * inset0)
{
BOOST_ASSERT(inset0);
if (inMathed())
insert(MathAtom(inset));
insert(MathAtom(inset0));
else
text()->insertInset(*this, inset);
inset->setBuffer(bv_->buffer());
text()->insertInset(*this, inset0);
inset().setBuffer(bv_->buffer());
}