# HG changeset patch # User John W. Eaton # Date 1552543769 0 # Node ID db59dabf1685822d691ab5abfff99b5c9a995e29 # Parent 91e5d37aaba0f9ea3a6e2fa3ecc4fdb874aef864 feval: silently return empty value list if function object is undefined * oct-parse.yy (feval): In version that takes function, handle, or string in an octave_value object, return early if object containing function, handle, or name is undefined. diff -r 91e5d37aaba0 -r db59dabf1685 libinterp/parse-tree/oct-parse.yy --- a/libinterp/parse-tree/oct-parse.yy Wed Mar 13 16:52:30 2019 -0700 +++ b/libinterp/parse-tree/oct-parse.yy Thu Mar 14 06:09:29 2019 +0000 @@ -5216,6 +5216,15 @@ octave_value_list feval (const octave_value& val, const octave_value_list& args, int nargout) { + // FIXME: do we really want to silently return an empty ovl if + // the function object is undefined? It's essentially what the + // version above that accepts a pointer to an octave_function + // object does and some code was apparently written to rely on it + // (for example, __ode15__). + + if (val.is_undefined ()) + return ovl (); + if (val.is_function ()) { return feval (val.function_value (), args, nargout);