Mercurial > octave-nkf
comparison src/graphics.cc @ 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 | c3d4542a4f06 |
children | 5cbf660e649d |
comparison
equal
deleted
inserted
replaced
12676:2783fa95cab7 | 12678:69cd5ebe5fb5 |
---|---|
6907 | 6907 |
6908 int nargin = args.length (); | 6908 int nargin = args.length (); |
6909 | 6909 |
6910 if (nargin == 1 || nargin == 2) | 6910 if (nargin == 1 || nargin == 2) |
6911 { | 6911 { |
6912 if (args(0).is_empty()) | |
6913 { | |
6914 retval = Matrix (); | |
6915 return retval; | |
6916 } | |
6917 | |
6912 ColumnVector hcv (args(0).vector_value ()); | 6918 ColumnVector hcv (args(0).vector_value ()); |
6913 | 6919 |
6914 if (! error_state) | 6920 if (! error_state) |
6915 { | 6921 { |
6916 octave_idx_type len = hcv.length (); | 6922 octave_idx_type len = hcv.length (); |