]> git.lyx.org Git - features.git/commitdiff
Fix crash reported by Kornel.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Thu, 14 Jan 2021 19:17:51 +0000 (14:17 -0500)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Thu, 14 Jan 2021 19:17:51 +0000 (14:17 -0500)
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

index 939b92bd983e314965e9e7a0f47adf71fee83f54..074047f4901f634a21ff0ff70d9b25787ac17883 100644 (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())