From b269eb9117b299b5485488befbe9ad9a2b9b7ecd Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Mon, 3 May 2010 23:04:51 +0000 Subject: [PATCH] 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 --- src/BufferView.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.39.2