changeset 17608:e7692efcbd0d

graphics.cc: don't ask for (orphan) dummy axes parent properties. * axes::properties::get_boundingbox : get default figure size if parent object is invalid (Bug # 39371)
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Tue, 08 Oct 2013 23:18:17 +0200
parents 07a4597fcbac
children ec31ca0a5812
files libinterp/corefcn/graphics.cc
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc	Tue Oct 08 23:18:17 2013 +0200
+++ b/libinterp/corefcn/graphics.cc	Tue Oct 08 23:18:17 2013 +0200
@@ -7669,8 +7669,11 @@
     {
       graphics_object obj = gh_manager::get_object (get_parent ());
 
-      parent_size =
-       obj.get_properties ().get_boundingbox (true).extract_n (0, 2, 1, 2);
+      if (obj.valid_object ())
+        parent_size =
+          obj.get_properties ().get_boundingbox (true).extract_n (0, 2, 1, 2);
+      else
+        parent_size = default_figure_position ();
     }
 
   pos = convert_position (pos, get_units (), "pixels", parent_size);