# HG changeset patch # User Olaf Till # Date 1517896809 -3600 # Node ID cbe53b5ea5ce2eb2444392e09be2967f73b4253b # Parent 72ea868ca63afafa0d5fe2f77d8a57f8a56643e4 check success of loading oct-file (bug #52977) * oct-parse.in.yy (load_fcn_from_file): Ensure function returned from load_oct is valid before using it. diff -r 72ea868ca63a -r cbe53b5ea5ce libinterp/parse-tree/oct-parse.in.yy --- a/libinterp/parse-tree/oct-parse.in.yy Wed Apr 11 00:07:06 2018 -0400 +++ b/libinterp/parse-tree/oct-parse.in.yy Tue Feb 06 07:00:09 2018 +0100 @@ -4753,9 +4753,11 @@ octave_function *tmpfcn = dyn_loader.load_oct (nm, file, relative_lookup); - tmpfcn->stash_package_name (package_name); - - retval = octave_value (tmpfcn); + if (tmpfcn) + { + tmpfcn->stash_package_name (package_name); + retval = octave_value (tmpfcn); + } } else if (len > 4 && file.substr (len-4, len-1) == ".mex") {