diff scripts/plot/gco.m @ 15246: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 f7bcfb3b96e7
children 772f51539af8
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