Mercurial > octave-nkf
changeset 12678:69cd5ebe5fb5
Stop obscure warnings when get() called with null matrix input (bug #32642)
* graphics.cc (get): Add check for null matrix before attempting to convert
arg(0) input to a vector.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 15 May 2011 17:35:57 -0700 |
parents | 2783fa95cab7 |
children | abfcb5d5641b |
files | src/graphics.cc |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/graphics.cc Sun May 15 10:50:30 2011 -0700 +++ b/src/graphics.cc Sun May 15 17:35:57 2011 -0700 @@ -6909,6 +6909,12 @@ if (nargin == 1 || nargin == 2) { + if (args(0).is_empty()) + { + retval = Matrix (); + return retval; + } + ColumnVector hcv (args(0).vector_value ()); if (! error_state)