From 8c5ad7af21e2d68e28360b2284711d4fb7548b76 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Mon, 12 Apr 2010 08:10:54 +0000 Subject: [PATCH] Revert part of r33908. We need a way to test for the pointer to be valid before using it in updateHoveredInset(). For now, just set it to zero, so that this critical won't find its way into alpha-2. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34117 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 672ac2f280..3bbb23cfc2 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -403,6 +403,11 @@ bool BufferView::fitCursor() void BufferView::processUpdateFlags(Update::flags flags) { + // last_inset_ points to the last visited inset. This pointer may become + // invalid because of keyboard editing. Since all such operations + // causes screen update(), I reset last_inset_ to avoid such a problem. + d->last_inset_ = 0; + // This is close to a hot-path. LYXERR(Debug::DEBUG, "BufferView::processUpdateFlags()" << "[fitcursor = " << (flags & Update::FitCursor) -- 2.39.2