diff libgui/graphics/Object.cc @ 25044:b6aea95a7bf9 stable

store graphics object in Qt backend to avoid crash (bug #53487, #53500) * Figure.cc (Figure::update): Return early if window doesn't exist. * Object.h, Object.cc (Object::m_go): New data member. (Object::object): Return m_go instead of using gh_manager to find it.
author John W. Eaton <jwe@octave.org>
date Wed, 28 Mar 2018 17:36:40 -0400
parents 194eb4bd202b
children 6652d3823428
line wrap: on
line diff
--- a/libgui/graphics/Object.cc	Wed Mar 28 21:46:11 2018 +0200
+++ b/libgui/graphics/Object.cc	Wed Mar 28 17:36:40 2018 -0400
@@ -35,7 +35,7 @@
 {
 
   Object::Object (const graphics_object& go, QObject *obj)
-    : QObject (), m_handle (go.get_handle ()), m_qobject (nullptr)
+    : QObject (), m_go (go), m_handle (go.get_handle ()), m_qobject (nullptr)
   {
     gh_manager::auto_lock lock (false);
 
@@ -78,7 +78,7 @@
                  "accessing graphics object (h=%g) without a valid lock!!!",
                  m_handle.value ());
 
-    return gh_manager::get_object (m_handle);
+    return m_go;
   }
 
   void