Mercurial > octave
changeset 29543:97238418c028
avoid accessing invalid app context during interpreter initialization
* interpreter.cc (interpreter::initialize): Avoid dereferencing
invalid m_app_context pointer.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 19 Apr 2021 17:16:20 -0400 |
parents | 3d34b70b5a49 |
children | 4eeef8cdaa2c |
files | libinterp/corefcn/interpreter.cc |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/interpreter.cc Fri Apr 16 23:06:32 2021 -0400 +++ b/libinterp/corefcn/interpreter.cc Mon Apr 19 17:16:20 2021 -0400 @@ -730,11 +730,16 @@ if (m_initialized) return; - const cmdline_options& options = m_app_context->options (); + if (m_app_context) + { + const cmdline_options& options = m_app_context->options (); - if (options.experimental_terminal_widget ()) - { - if (! options.gui ()) + if (options.experimental_terminal_widget ()) + { + if (! options.gui ()) + display_startup_message (); + } + else display_startup_message (); } else