# HG changeset patch # User Rik # Date 1653417480 25200 # Node ID a4a010d40459b1483083976e941baab837c27cc0 # Parent ab5a4df64bc338a9f309edd57071e047025c5299# Parent 490e8a6107d05af8085e4b87832dce709307fe22 maint: merge stable to default diff -r ab5a4df64bc3 -r a4a010d40459 libinterp/octave-value/ov-fcn-handle.cc --- a/libinterp/octave-value/ov-fcn-handle.cc Mon May 23 21:02:49 2022 -0700 +++ b/libinterp/octave-value/ov-fcn-handle.cc Tue May 24 11:38:00 2022 -0700 @@ -396,7 +396,8 @@ const std::shared_ptr& stack_context) : base_nested_fcn_handle (fcn, name), m_stack_context (stack_context) { - m_stack_context->mark_closure_context (); + if (m_stack_context) + m_stack_context->mark_closure_context (); } nested_fcn_handle (const nested_fcn_handle&) = default; @@ -2697,7 +2698,10 @@ const std::shared_ptr& stack_context) : base_anonymous_fcn_handle (fcn, local_vars), m_stack_context (stack_context) - { } + { + if (m_stack_context) + m_stack_context->mark_closure_context (); + } octave_value anonymous_fcn_handle::make_weak_anonymous_handle (void) const {