changeset 29177:bd5961abe971 stable

* file-editor-tab.cc (dtor): do not delete m_edit_area (bug #59628)
author Torsten Lilge <ttl-octave@mailbox.org>
date Mon, 07 Dec 2020 19:04:55 +0100
parents 4ca50ceb9576
children 4df23e9ed4dd eec0fe95576e
files libgui/src/m-editor/file-editor-tab.cc
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc	Fri Dec 11 11:42:53 2020 -0500
+++ b/libgui/src/m-editor/file-editor-tab.cc	Mon Dec 07 19:04:55 2020 +0100
@@ -280,16 +280,14 @@
     emit remove_all_breakpoints ();
     emit remove_all_positions ();
 
-    // Destroy items attached to m_edit_area.
+    // Destroy lexer attached to m_edit_area, which is not the parent
+    // of lexer
     QsciLexer *lexer = m_edit_area->lexer ();
     if (lexer)
       {
         delete lexer;
         m_edit_area->setLexer (nullptr);
       }
-
-    // Destroy m_edit_area.
-    delete m_edit_area;
   }
 
   void file_editor_tab::set_encoding (const QString& new_encoding)