changeset 28342:b95dbd889f1a

maint: merge stable to default.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 21 May 2020 19:10:53 +0200
parents 8abd3d8a9a2b (current diff) 809c61402196 (diff)
children 40024b83597c
files libinterp/corefcn/graphics.cc
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc	Thu May 21 12:52:36 2020 +0200
+++ b/libinterp/corefcn/graphics.cc	Thu May 21 19:10:53 2020 +0200
@@ -13321,11 +13321,20 @@
       if (! h.ok ())
         error ("__go_figure__: failed to create figure handle");
 
+      try
+        {
+          xset (h, xargs);
+        }
+      catch (octave::execution_exception& e)
+        {
+          delete_graphics_object (h);
+          error (e, "__go_figure__: unable to create figure handle");
+        }
+
       adopt (0, h);
 
       gh_mgr.push_figure (h);
 
-      xset (h, xargs);
       xcreatefcn (h);
       xinitialize (h);