Mercurial > hg > octave-terminal
changeset 6347:e40a46a100b6
[project @ 2007-02-23 00:28:58 by jwe]
author | jwe |
---|---|
date | Fri, 23 Feb 2007 00:28:58 +0000 |
parents | f3c5b02c66bf |
children | 1f5de98984c3 |
files | src/ChangeLog src/mex.cc |
diffstat | 2 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2007-02-22 John W. Eaton <jwe@octave.org> + * mex.cc (mxArray_cell::mxArray_cell (const mxArray_cell&), + mxArray_struct::mxArray_struct (const mxArray_struct&)): + Avoid calling clone on 0 elements. + * variables.cc (symbol_out_of_date): If checking nested function, look for file using parent function name. Delete unused variable NAMES.
--- a/src/mex.cc +++ b/src/mex.cc @@ -1839,7 +1839,10 @@ int nel = get_number_of_elements (); for (int i = 0; i < nel * nfields; i++) - data[i] = val.data[i]->clone (); + { + mxArray *ptr = val.data[i]; + data[i] = ptr ? ptr->clone () : 0; + } } }; @@ -1913,7 +1916,10 @@ int nel = get_number_of_elements (); for (int i = 0; i < nel; i++) - data[i] = val.data[i]->clone (); + { + mxArray *ptr = val.data[i]; + data[i] = ptr ? ptr->clone () : 0; + } } };