fix problem with uninitialized value as reported by Michael

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5711 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2002-11-25 10:18:06 +00:00
parent f454da736f
commit c9e33c37e6

View File

@ -65,7 +65,7 @@ string theCutBuffer;
MathCursor::MathCursor(InsetFormulaBase * formula, bool front)
: formula_(formula), autocorrect_(false), selection_(false)
: formula_(formula), autocorrect_(false), selection_(false), targetx_(-1)
{
front ? first() : last();
Anchor_ = Cursor_;
@ -1467,9 +1467,11 @@ void MathCursor::handleFont(string const & font)
void releaseMathCursor(BufferView * bv)
{
if (!mathcursor)
return;
mathcursor->formula()->hideInsetCursor(bv);
delete mathcursor;
mathcursor = 0;
if (mathcursor) {
InsetFormulaBase * f = mathcursor->formula();
f->hideInsetCursor(bv);
delete mathcursor;
mathcursor = 0;
f->insetUnlock(bv);
}
}