diff 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
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)