From a8e914b500a827e2236023ce356ffb47cae8fa82 Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Wed, 3 Jan 2007 23:05:27 +0000 Subject: [PATCH] Fix crashes caused by invalid last_inset_ due to keyboard editing git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16485 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.C | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/BufferView.C b/src/BufferView.C index ede9d687b8..b1cfd99a49 100644 --- a/src/BufferView.C +++ b/src/BufferView.C @@ -335,6 +335,10 @@ bool BufferView::multiParSel() bool BufferView::update(Update::flags flags) { + // last_inset_ points to the last visited inset. This pointer may become + // invalid becuase of keyboard editing. Since all such operations + // causes screen update(), I reset last_inset_ to avoid such a problem. + last_inset_ = 0; // This is close to a hot-path. if (lyxerr.debugging(Debug::DEBUG)) { lyxerr[Debug::DEBUG]