From: Richard Kimberly Heck Date: Thu, 14 Jan 2021 19:17:51 +0000 (-0500) Subject: Fix crash reported by Kornel. X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e7b9aa672f0fcb61676702e90facabbfa900ddec;p=features.git 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. --- diff --git a/src/Cursor.cpp b/src/Cursor.cpp index 939b92bd98..074047f490 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -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())