From e7b9aa672f0fcb61676702e90facabbfa900ddec Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck Date: Thu, 14 Jan 2021 14:17:51 -0500 Subject: [PATCH] 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. --- src/Cursor.cpp | 3 +++ 1 file changed, 3 insertions(+) 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()) -- 2.39.2