Fix crash reported by Kornel.

See https://marc.info/?l=lyx-devel&m=161058233016780&w=2.

Internal Buffers do not have TOCs associated with them, so we should
not try to update them. This fixes Kornel's crash, but there may be
other instances of the problem.
This commit is contained in:
Richard Kimberly Heck 2021-01-14 14:17:51 -05:00
parent 7c57001ad7
commit e7b9aa672f

View File

@ -2471,6 +2471,9 @@ void Cursor::setCurrentFont()
void Cursor::checkBufferStructure()
{
if (buffer()->isInternal())
return;
Buffer const * master = buffer()->masterBuffer();
master->tocBackend().updateItem(*this);
if (master != buffer() && !master->hasGuiDelegate())