# HG changeset patch # User Ben Abbott # Date 1224512944 14400 # Node ID 041bb0c64f07eeaf3bef27fda18c0ad01980c72e # Parent 6ef647359f076a1864bf22d0ddb35d5b07f923fc orient.m,print.f: validate figure handle diff -r 6ef647359f07 -r 041bb0c64f07 scripts/ChangeLog --- a/scripts/ChangeLog Mon Oct 20 10:23:31 2008 -0400 +++ b/scripts/ChangeLog Mon Oct 20 10:29:04 2008 -0400 @@ -3,6 +3,8 @@ * plot/__stem__.m: Respect new ordering of children when setting baseline. + * plot/orient.m, plot/print.m: Properly validate figure handle. + 2008-10-20 David Bateman * plot/plotyy.m: Test that an axes handle actually is one before diff -r 6ef647359f07 -r 041bb0c64f07 scripts/plot/orient.m --- a/scripts/plot/orient.m Mon Oct 20 10:23:31 2008 -0400 +++ b/scripts/plot/orient.m Mon Oct 20 10:29:04 2008 -0400 @@ -32,7 +32,7 @@ nargs = nargin; - if (nargs > 0 && numel (varargin{1}) == 1 && ishandle (varargin{1})) + if (nargs > 0 && numel (varargin{1]) == 1 && isfigure (varargin{1})) cf = varargin{1}; varargin(1) = []; nargs--; diff -r 6ef647359f07 -r 041bb0c64f07 scripts/plot/print.m --- a/scripts/plot/print.m Mon Oct 20 10:23:31 2008 -0400 +++ b/scripts/plot/print.m Mon Oct 20 10:29:04 2008 -0400 @@ -190,7 +190,7 @@ elseif (length (arg) > 0) name = arg; endif - elseif (ishandle (arg)) + elseif (isfigure (arg)) figure (arg); else error ("print: expecting inputs to be character string options or a figure handle"); @@ -439,7 +439,7 @@ endif unwind_protect_cleanup - if (ishandle (old_fig)) + if (isfigure (old_fig)) figure (old_fig) endif end_unwind_protect