changeset 15247:fa8f3955e70a

gco.m: Don't create figure if it doesn't already exist (Bug #37211) * gco.m: Don't use gcf() to find current figure because it automatically creates a figure when one doesn't exist.
author Rik <rik@octave.org>
date Tue, 28 Aug 2012 16:20:43 -0700
parents 4c0cef65c55f
children e787ba62aacf
files scripts/plot/gco.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/gco.m
+++ b/scripts/plot/gco.m
@@ -40,6 +40,6 @@
 
 function h = gco ()
 
-  h = get (gcf (), "currentobject");
+  h = get (get (0, "currentfigure"), "currentobject");
 
 endfunction