# HG changeset patch # User Rik # Date 1318796732 25200 # Node ID a0875c6cab7e9dd27ff8cbfc3f24930b50afaefa # Parent ee28bf4c3c292322d0ee38e3436aacb0d0fa54ba error.cc: Don't complain if error struct input is empty (Matlab compatability) * error.cc (error): Don't complain if error struct input is empty (Matlab compatability) diff -r ee28bf4c3c29 -r a0875c6cab7e src/error.cc --- a/src/error.cc Sun Oct 16 13:18:41 2011 -0700 +++ b/src/error.cc Sun Oct 16 13:25:32 2011 -0700 @@ -1062,6 +1062,10 @@ } else if (nargin == 1 && args(0).is_map ()) { + // empty struct is not an error. return and resume calling function. + if (args(0).is_empty ()) + return retval; + octave_value_list tmp; octave_scalar_map m = args(0).scalar_map_value ();