changeset 27173:f3450193272d

improve message for setting breakpoint in nonexistent function (bug #56157) * pt-eval.cc (tree_evaluator::get_user_code): Return nullptr if subfunction is not found.
author John W. Eaton <jwe@octave.org>
date Wed, 12 Jun 2019 08:48:15 -0500
parents b0abae0bd94b
children b42350f18afb
files libinterp/parse-tree/pt-eval.cc
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-eval.cc	Tue Jun 11 12:53:55 2019 -0500
+++ b/libinterp/parse-tree/pt-eval.cc	Wed Jun 12 08:48:15 2019 -0500
@@ -2109,6 +2109,9 @@
 
         fcn = user_code->find_subfunction (subfuns);
 
+        if (fcn.is_undefined ())
+          return nullptr;
+
         user_code = fcn.user_code_value ();
       }