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
This commit is contained in:
Bo Peng 2007-01-03 23:05:27 +00:00
parent ac88413021
commit a8e914b500

View File

@ -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]