changeset 26746:3d0f687e4a21 stable

avoid crash if help engine setup fails (bug #55736) * documentation.cc (documentation::documentation): Don't return early if help engine setup fails. Do disconnect existing help engine signals, delete help engine object, and set m_help_engine to nullptr.
author John W. Eaton <jwe@octave.org>
date Tue, 19 Feb 2019 21:31:41 +0000
parents b812ed975ea8
children a3dfdbb9d8c5 2a0004e7c574
files libgui/src/documentation.cc
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/documentation.cc	Mon Feb 18 18:33:18 2019 +0000
+++ b/libgui/src/documentation.cc	Tue Feb 19 21:31:41 2019 +0000
@@ -112,10 +112,11 @@
                                   "documentation viewer. Only help texts in\n"
                                   "the Command Window will be available."));
 #endif
-        if (m_help_engine)
-          delete m_help_engine;
-        m_help_engine = 0;
-        return;
+
+        disconnect (m_help_engine, 0, 0, 0);
+
+        delete m_help_engine;
+        m_help_engine = nullptr;
       }
 
     // The browser