Mercurial > octave
comparison libinterp/parse-tree/oct-parse.in.yy @ 25206:cbe53b5ea5ce stable
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.
author | Olaf Till <i7tiol@t-online.de> |
---|---|
date | Tue, 06 Feb 2018 07:00:09 +0100 |
parents | 6f1fde568e46 |
children | 01ad54f997f5 9e39a53b4e00 |
comparison
equal
deleted
inserted
replaced
25203:72ea868ca63a | 25206:cbe53b5ea5ce |
---|---|
4751 nm = fcn_name; | 4751 nm = fcn_name; |
4752 | 4752 |
4753 octave_function *tmpfcn | 4753 octave_function *tmpfcn |
4754 = dyn_loader.load_oct (nm, file, relative_lookup); | 4754 = dyn_loader.load_oct (nm, file, relative_lookup); |
4755 | 4755 |
4756 tmpfcn->stash_package_name (package_name); | 4756 if (tmpfcn) |
4757 | 4757 { |
4758 retval = octave_value (tmpfcn); | 4758 tmpfcn->stash_package_name (package_name); |
4759 retval = octave_value (tmpfcn); | |
4760 } | |
4759 } | 4761 } |
4760 else if (len > 4 && file.substr (len-4, len-1) == ".mex") | 4762 else if (len > 4 && file.substr (len-4, len-1) == ".mex") |
4761 { | 4763 { |
4762 // Temporarily load m-file version of mex-file, if it exists, | 4764 // Temporarily load m-file version of mex-file, if it exists, |
4763 // to get the help-string to use. | 4765 // to get the help-string to use. |