changeset 24615:3daa67b7a243

maint: merge stable to default.
author Rik <rik@octave.org>
date Wed, 17 Jan 2018 11:25:42 -0800
parents 93219261164d (current diff) 60d6914d801b (diff)
children 66729bff9877
files libinterp/corefcn/graphics.cc
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc	Wed Jan 17 17:55:46 2018 +0000
+++ b/libinterp/corefcn/graphics.cc	Wed Jan 17 11:25:42 2018 -0800
@@ -11145,13 +11145,23 @@
     }
   catch (octave::execution_exception& e)
     {
-      error (e, "__go%s__: unable to create graphics handle",
+      error (e, "__go_%s__: unable to create graphics handle",
              go_name.c_str ());
     }
 
   adopt (parent, h);
 
-  xset (h, xargs);
+  try
+    {
+      xset (h, xargs);
+    }
+  catch (octave::execution_exception& e)
+    {
+      delete_graphics_object (h);
+      error (e, "__go_%s__: unable to create graphics handle",
+             go_name.c_str ());
+    }
+
   xcreatefcn (h);
   xinitialize (h);