From: Vincent van Ravesteijn Date: Mon, 3 May 2010 23:04:51 +0000 (+0000) Subject: Fix a crash due to Inset**::mouse_hover_[] containing an invalid pointer to a BufferView. X-Git-Tag: 2.0.0~3295 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b269eb9117b299b5485488befbe9ad9a2b9b7ecd;p=features.git Fix a crash due to Inset**::mouse_hover_[] containing an invalid pointer to a BufferView. Clear the mouse_hover state when closing the BufferView. Otherwise, there will be an invalid pointer stored in the Inset and crashing LyX when the Inset's destructor is called. See also r33908, r34117, r34348, r34353, r34354, r34363 and bug #3900. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34365 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 3050a7b498..9d7af3bbad 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -315,6 +315,9 @@ BufferView::~BufferView() fp.pit = d->cursor_.bottom().pit(); fp.pos = d->cursor_.bottom().pos(); theSession().lastFilePos().save(buffer_.fileName(), fp); + + if (d->last_inset_) + d->last_inset_->setMouseHover(this, false); delete d; }